Greasy Fork is available in English.

Feedly Colorful Listview Mod

Feedly Colorful Listview Mod working with Chrome

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

You will need to install an extension such as Tampermonkey to install this script.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name           Feedly Colorful Listview Mod
// @id             FeedlyColorfulListviewMod
// @version        0.0.9.20161116
// @description    Feedly Colorful Listview Mod working with Chrome
// @namespace      https://greatest.deepsurf.us/pl/users/66016-marcindabrowski
// @match          *://*.feedly.com/*
// @require        http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require        https://greatest.deepsurf.us/scripts/23268-waitforkeyelements/code/waitForKeyElements.js?version=147835
// @grant          GM_addStyle
// @run-at         document-end
// ==/UserScript==
var ColorfulListView = function () {
	this.initialize.apply(this, arguments);
};

ColorfulListView.prototype = {
	initialize:function () {
		this.colors = {};
	},
    makeColor:function (str) {
		var h = 0;
        for (var i = 0; i < str.length; i++) {
            h += str.charCodeAt(i);
        }
		return {"h":(h%36+1)*10, "s":30 + (h%5+1)*10};
	},
	color:function (item) {
		var itemid = item.id.replace(/^([^=]+).*$/, "$1");
		item.setAttribute("data-color", itemid);
		if (this.colors[itemid]!==undefined) return null;
		this.colors[itemid] = this.makeColor(itemid);
		GM_addStyle(
			"div[data-color='" + itemid + "'] {background:hsl(" + this.colors[itemid].h + "," + this.colors[itemid].s + "%,80%) !important;}"	+
            "div[data-color='" + itemid + "']:hover {background:hsl(" + this.colors[itemid].h + "," + this.colors[itemid].s + "%,70%) !important;}"
		);
	}
};
var colorfulListViewObj = new ColorfulListView();

waitForKeyElements (".entry", colorEntry);

function colorEntry (jNode) {
    colorfulListViewObj.color(jNode[0]);
}