Skip to content

Instantly share code, notes, and snippets.

@unicornrainbow
Last active December 20, 2021 10:33
Show Gist options
  • Save unicornrainbow/f66169f7d5ec41c5c46f963faa804f69 to your computer and use it in GitHub Desktop.
Save unicornrainbow/f66169f7d5ec41c5c46f963faa804f69 to your computer and use it in GitHub Desktop.
Colorize Your Twitter Stream 🎈 Colorize The World. 🎊
// ==UserScript==
// @name Color 4 Tweet
// @version 0.1.2
// @grant none
// @match https://twitter.com/*
// @require https://unpkg.com/jquery@3.6.0/dist/jquery.js
// @require https://unpkg.com/jquery.initialize@1.3.0/jquery.initialize.js
// @grant GM_addStyle
// @grant GM_setValue
// ==/UserScript==
// What does a grease monkey, a pet shark and a tire swing all have in common?
jQuery(function() {
const s = ".css-901oao.r-37j5jr.r-a023e6.r-16dba41.r-rjixqe.r-bcqeeo.r-bnwqim.r-qvutc0";
$.initialize(s, function() {
let t = $(this),
h = MD5(t.text());
t.css("color", "#" + h.substr(0,6));});});
/////////////////////////////////////////////////
//// Meatball Dialator No. 5 ////////////////////////////////////////////
//// Sourced @ www.css-tricks.com/snippets/javascript/javascript-md5 ////
//// Compressed via jscompress.com ////
/**/ function MD5(r){function i(r,n){return r<<n|r>>>32-n}function c(r,n){var t=2147483648&r,o=2147483648&n,e=1073741824&r,u=1073741824&n,n=(1073741823&r)+(1073741823&n);return e&u?2147483648^n^t^o:e|u?1073741824&n?3221225472^n^t^o:1073741824^n^t^o:n^t^o}function n(r,n,t,o,e,u,a){var f;return r=c(r,c(c((f=n)&t|~f&o,e),a)),c(i(r,u),n)}function t(r,n,t,o,e,u,a){return r=c(r,c(c(n&(o=o)|t&~o,e),a)),c(i(r,u),n)}function o(r,n,t,o,e,u,a){return r=c(r,c(c(n^t^o,e),a)),c(i(r,u),n)}function e(r,n,t,o,e,u,a){return r=c(r,c(c(t^(n|~o),e),a)),c(i(r,u),n)}function u(r){for(var n="",t="",o=0;o<=3;o++)n+=(t="0"+(r>>>8*o&255).toString(16)).substr(t.length-2,2);return n}for(var a,f,C,g,h=Array(),h=function(r){for(var n,t=r.length,o=16*(1+((o=t+8)-o%64)/64),e=Array(o-1),u=0,a=0;a<t;)u=a%4*8,e[n=(a-a%4)/4]=e[n]|r.charCodeAt(a)<<u,a++;return u=a%4*8,e[n=(a-a%4)/4]=e[n]|128<<u,e[o-2]=t<<3,e[o-1]=t>>>29,e}(r=function(r){r=r.replace(/\r\n/g,"\n");for(var n="",t=0;t<r.length;t++){var o=r.charCodeAt(t);o<128?n+=String.fromCharCode(o):(127<o&&o<2048?n+=String.fromCharCode(o>>6|192):(n+=String.fromCharCode(o>>12|224),n+=String.fromCharCode(o>>6&63|128)),n+=String.fromCharCode(63&o|128))}return n}(r)),v=1732584193,d=4023233417,S=2562383102,l=271733878,m=0;m<h.length;m+=16)v=n(a=v,f=d,C=S,g=l,h[m+0],7,3614090360),l=n(l,v,d,S,h[m+1],12,3905402710),S=n(S,l,v,d,h[m+2],17,606105819),d=n(d,S,l,v,h[m+3],22,3250441966),v=n(v,d,S,l,h[m+4],7,4118548399),l=n(l,v,d,S,h[m+5],12,1200080426),S=n(S,l,v,d,h[m+6],17,2821735955),d=n(d,S,l,v,h[m+7],22,4249261313),v=n(v,d,S,l,h[m+8],7,1770035416),l=n(l,v,d,S,h[m+9],12,2336552879),S=n(S,l,v,d,h[m+10],17,4294925233),d=n(d,S,l,v,h[m+11],22,2304563134),v=n(v,d,S,l,h[m+12],7,1804603682),l=n(l,v,d,S,h[m+13],12,4254626195),S=n(S,l,v,d,h[m+14],17,2792965006),v=t(v,d=n(d,S,l,v,h[m+15],22,1236535329),S,l,h[m+1],5,4129170786),l=t(l,v,d,S,h[m+6],9,3225465664),S=t(S,l,v,d,h[m+11],14,643717713),d=t(d,S,l,v,h[m+0],20,3921069994),v=t(v,d,S,l,h[m+5],5,3593408605),l=t(l,v,d,S,h[m+10],9,38016083),S=t(S,l,v,d,h[m+15],14,3634488961),d=t(d,S,l,v,h[m+4],20,3889429448),v=t(v,d,S,l,h[m+9],5,568446438),l=t(l,v,d,S,h[m+14],9,3275163606),S=t(S,l,v,d,h[m+3],14,4107603335),d=t(d,S,l,v,h[m+8],20,1163531501),v=t(v,d,S,l,h[m+13],5,2850285829),l=t(l,v,d,S,h[m+2],9,4243563512),S=t(S,l,v,d,h[m+7],14,1735328473),v=o(v,d=t(d,S,l,v,h[m+12],20,2368359562),S,l,h[m+5],4,4294588738),l=o(l,v,d,S,h[m+8],11,2272392833),S=o(S,l,v,d,h[m+11],16,1839030562),d=o(d,S,l,v,h[m+14],23,4259657740),v=o(v,d,S,l,h[m+1],4,2763975236),l=o(l,v,d,S,h[m+4],11,1272893353),S=o(S,l,v,d,h[m+7],16,4139469664),d=o(d,S,l,v,h[m+10],23,3200236656),v=o(v,d,S,l,h[m+13],4,681279174),l=o(l,v,d,S,h[m+0],11,3936430074),S=o(S,l,v,d,h[m+3],16,3572445317),d=o(d,S,l,v,h[m+6],23,76029189),v=o(v,d,S,l,h[m+9],4,3654602809),l=o(l,v,d,S,h[m+12],11,3873151461),S=o(S,l,v,d,h[m+15],16,530742520),v=e(v,d=o(d,S,l,v,h[m+2],23,3299628645),S,l,h[m+0],6,4096336452),l=e(l,v,d,S,h[m+7],10,1126891415),S=e(S,l,v,d,h[m+14],15,2878612391),d=e(d,S,l,v,h[m+5],21,4237533241),v=e(v,d,S,l,h[m+12],6,1700485571),l=e(l,v,d,S,h[m+3],10,2399980690),S=e(S,l,v,d,h[m+10],15,4293915773),d=e(d,S,l,v,h[m+1],21,2240044497),v=e(v,d,S,l,h[m+8],6,1873313359),l=e(l,v,d,S,h[m+15],10,4264355552),S=e(S,l,v,d,h[m+6],15,2734768916),d=e(d,S,l,v,h[m+13],21,1309151649),v=e(v,d,S,l,h[m+4],6,4149444226),l=e(l,v,d,S,h[m+11],10,3174756917),S=e(S,l,v,d,h[m+2],15,718787259),d=e(d,S,l,v,h[m+9],21,3951481745),v=c(v,a),d=c(d,f),S=c(S,C),l=c(l,g);return(u(v)+u(d)+u(S)+u(l)).toLowerCase()};
//////////////////////////////////////////////////////////////////////////////
// πŸ¦„πŸŒˆ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment