Created
July 7, 2020 14:49
-
-
Save andraaspar/1d0f592d4fb88863d1b27b81b058d8f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Feedly | |
// @namespace andraaspar | |
// @version 0.2.0 | |
// @description Make feedly friendly | |
// @author AP | |
// @match https://feedly.com/* | |
// @run-at document-idle | |
// @require https://code.jquery.com/jquery-3.2.1.slim.min.js | |
// ==/UserScript== | |
jQuery("head").append(`<style> | |
.engagement-container:not(#__never__) { | |
text-align: right; | |
} | |
.EntryEngagement { | |
color: gray; | |
} | |
</style>`); | |
jQuery("body").on("click", update); | |
update(); | |
function update() { | |
let engagementsJq = jQuery(".EntryEngagement"); | |
for (let i = 0; i < engagementsJq.length; i++) { | |
engagementJq = engagementsJq.eq(i); | |
let label = engagementJq | |
.text() | |
.replace(/\+/g, "") | |
.replace(/K/g, ",000") | |
.replace(/M/g, ",000,000"); | |
engagementJq.text(label); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment