Skip to content

Instantly share code, notes, and snippets.

@andraaspar
Created July 7, 2020 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andraaspar/1d0f592d4fb88863d1b27b81b058d8f1 to your computer and use it in GitHub Desktop.
Save andraaspar/1d0f592d4fb88863d1b27b81b058d8f1 to your computer and use it in GitHub Desktop.
// ==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