Last active
May 12, 2021 17:47
-
-
Save happiness801/aadf7b0914c0e345c531dbe529f4429d to your computer and use it in GitHub Desktop.
I created a userscript to help demystify the complexity of crypto by providing layman term translations to the jargon right inline in the articles you’re reading!
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 Improves articles about NFTs | |
// @namespace http://onai.net/ | |
// @version 0.1 | |
// @description Makes NFT articles easier to understand | |
// @author Kevin Gwynn | |
// @match https://techcrunch.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
// Make sure jQuery is available | |
var gen = 0;var act=function(){gen=1;var script=document.createElement('script');script.src='//code.jquery.com/jquery-1.11.0.min.js';script.type='text/javascript';document.getElementsByTagName('head')[0].appendChild(script);};(!window.jQuery)?act():1;setTimeout(function(){console.log('jQuery '+(gen?'loaded: ':'existing: ')+(window.jQuery?jQuery().jquery:'no jQuery/load failed'));}, 500); | |
var fixContent = function() { | |
// Remove cart sidebar | |
console.log('KAG: Fix NFT article content...'); | |
$('BODY').find(':not(IFRAME):contains(NFT)').each(function() { | |
$(this).html($(this).html() | |
.replace(/(NFT sales?|sales?)/g, '$1 (wasted money)') | |
.replace(/(NFT(?: art| platform|s)?)/g, '$1 (e.g. nothing)') | |
.replace(/(Ethereum blockchain)/gi, '$1 (e.g. a list of made up "receipts")') | |
.replace(/\b(Eth(?:er|ereum)?\b(?: cryptocurrency)?)/gi, '$1 (Monopoly money)') | |
.replace(/\b(paid|spent)/g, '<s>$1</s> <b>wasted</b>') | |
.replace(/\b(worth)\b/g, '"worth"') | |
); | |
}); | |
} | |
setTimeout(fixContent, 1500); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment