Skip to content

Instantly share code, notes, and snippets.

@fredley
Created February 24, 2015 21:35
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 fredley/72cf87b2dc86f0cdeb0d to your computer and use it in GitHub Desktop.
Save fredley/72cf87b2dc86f0cdeb0d to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name It's Never Friday
// @description Detects links to Rebecca Black's Friday
// @version 1.0.0
// @include *://chat.meta.stackoverflow.com/rooms/*
// @include *://chat.meta.stackexchange.com/rooms/*
// @include *://chat.stackexchange.com/rooms/*
// @include *://chat.stackoverflow.com/rooms/*
// @include *://chat.askubuntu.com/rooms/*
// @run-at document-end
// ==/UserScript==
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('3 4($){$.1t($.d,{4:3(e,i,t){7 u,n=2;f $.1r(e)&&(t=i,i=e,e=J 0),$.6($.4.g,3(r,s){f n.w!=s.w||n.m!=s.m||e!=s.8||i&&i.$b!=s.d.$b||t&&t.$b!=s.p.$b?J 0:(u=s)&&!1}),u=u||2N $.4(2.w,2.m,e,i,t),u.K=!1,u.x(),2},2I:3(e,i,t){7 u=2;f $.1r(e)&&(t=i,i=e,e=J 0),$.6($.4.g,3(n,r){u.w!=r.w||u.m!=r.m||e&&e!=r.8||i&&i.$b!=r.d.$b||t&&t.$b!=r.p.$b||2.K||$.4.G(r.1s)}),2}}),$.4=3(e,i,t,u,n){f 2.w=e,2.m=i,2.8=t,2.d=u,2.p=n,2.E=[],2.K=!1,2.1s=$.4.g.18(2)-1,u.$b=u.$b||$.4.Z++,n&&(n.$b=n.$b||$.4.Z++),2},$.4.2f={G:3(){7 e=2;2.8?2.E.2n(2.8,2.d):2.p&&2.E.6(3(i,t){e.p.L(t)}),2.E=[],2.K=!0},x:3(){5(!2.K){7 e=2,i=2.E,t=$(2.w,2.m),u=t.33(i);2.E=t,2.8?(u.2t(2.8,2.d),i.k>0&&$.6(i,3(i,u){$.R(u,t)<0&&$.2r.1m(u,e.8,e.d)})):(u.6(3(){e.d.L(2)}),2.p&&i.k>0&&$.6(i,3(i,u){$.R(u,t)<0&&e.p.L(u)}))}}},$.1t($.4,{Z:0,g:[],l:[],O:!1,S:2v,1q:3(){5($.4.O&&$.4.l.k)1o(7 e=$.4.l.k;e--;)$.4.g[$.4.l.2A()].x()},2z:3(){$.4.O=!1},1n:3(){$.4.O=!0,$.4.x()},1p:3(){$.6(A,3(e,i){5($.d[i]){7 t=$.d[i];$.d[i]=3(){7 e=$,i=t.L(2,A);f e.4.x(),i}}})},x:3(e){J 0!=e?$.R(e,$.4.l)<0&&$.4.l.18(e):$.6($.4.g,3(e){$.R(e,$.4.l)<0&&$.4.l.18(e)}),$.4.S&&2d($.4.S),$.4.S=2g($.4.1q,20)},G:3(e){J 0!=e?$.4.g[e].G():$.6($.4.g,3(e){$.4.g[e].G()})}}),$.4.1p("2c","2x","2X","2U","2C","C","2W","13","2V","2S","2T","1m","F"),$(3(){$.4.1n()})}3 1l(){1o(7 i=0;i<A.k;++i){5(2Y(A[i])==\'3\'){7 h=T.32(\'h\');h.8=\'31/W\';h.30=\'(\'+A[i].2Z()+\')(2a)\';T.2R.2Q(h)}}}1l(4,3($){$.Y=(3(26){7 P=1v.P,11=1v.11,1j=2G(P+\'//\'+11),1h=\'U\'+(/^2F/.B(P)?\'s\':\'\')+\'://15.2D.2E/2J/2K/2P?2O=?\',15="1B \'U://1C.1D.1A/W/1z.12\' 1w j; 1x * 1y j 1E 1f=\'1d.1c = y.1b(\\"{10}\\").1k(27).X();\'",1g="1B \'U://1C.1D.1A/W/1z.12\' 1w j; 1x * 1y j 1E 1f=\'1d.1c = y.1b(\\"{10}\\").1k(2j).X();\'";3 1i(c){f!1j.B(c)&&/:\\/\\//.B(c)}f 3(o){7 c=o.c;5(/X/i.B(o.8)&&!/1e/i.B(o.1F)&&1i(c)){o.c=1h;o.1F=\'1e\';7 1u=(o.28)?15:1g;o.D={q:1u.29(\'{10}\',c+(o.D?(/\\?/.B(c)?\'&\':\'?\')+2a.2i(o.D):\'\')),2y:\'12\'};5(!o.v&&o.17){o.v=o.17;2B o.17}o.v=(3(1a){f 3(D){5(1a){1a.2k(2,{2e:D,V:(D.2b[0]||\'\').29(/<h[^>]+?\\/>|<h(.|\\s)*?\\/h>/2h,\'\')},\'v\')}}})(o.v)}f 26.L(2,A)}})($.2H);3 19(9){$.Y({c:9.C(\'I\'),8:\'24\',28:27,v:3(N){5(N.V.1N(\'1O 1P\')>-1){H.M(9.C(\'I\')+\'1Q 1M 1L 1H 1G!\');9.25(\'1I\',\'#1J !1K\');9.F(\'1R: 1S 1Z 21 (\'+9.F()+\')\')}2L{H.M(\'2M \'+9.C(\'I\')+\' 2m\');$.Y({c:9.C(\'I\'),8:\'24\',v:3(N){5(N.V.1N(\'1O 1P\')>-1){H.M(9.C(\'I\')+\'1Q 1M 1L 1H 1G!\');9.25(\'1I\',\'#1J !1K\');9.F(\'1R: 1S 1Z 21 (\'+9.F()+\')\')}},22:3(){H.M(\'23\')}})}},22:3(){H.M(\'23\')}})}3 1V(){$(\'1U\').6(3(){5(!$(2).1Y(\'Q\')){$(2).13(\'Q\');5($(2).z(\'a\').k>0){$(2).z(\'a\').6(3(){19($(2))})}}})}3 14(){$(\'.16\').6(3(){5(!$(2).1Y(\'Q\')){$(2).13(\'Q\');5($(2).z(\'.1X\').1T().z(\'a\').k>0){$(2).z(\'.1X\').1T().z(\'a\').6(3(){19($(2))})}}})}$(T).2u(3(){7 1W=2p(3(){5($(\'.16\').k>0){14();$(\'#2s .16\').4(14);$(\'#2q-2o 1U\').4(1V);2l(1W)}},2w)})});',62,190,'||this|function|livequery|if|each|var|type|elem||lqguid|url|fn||return|queries|script|||length|queue|context|||fn2||||||success|selector|run||find|arguments|test|attr|data|elements|html|stop|console|href|void|stopped|apply|log|page|running|protocol|checked|inArray|timeout|document|http|responseText|javascript|get|bjax|guid|URL|hostname|xml|addClass|checkMessages|query|message|complete|push|checkA|_success|rest|object|response|json|code|query2|YQL|isExternal|exRegex|followRedirects|inject|remove|play|for|registerPlugin|checkQueue|isFunction|id|extend|qstr|location|as|select|from|execute|org|use|www|datatables|where|dataType|link|RB|color|f00|important|an|like|indexOf|Rebecca|Black|Looks|CAUTION|REBECCA|first|li|checkStarred|wait|content|hasClass|BLACK||LINK|error|fail|GET|css|_ajax|true|redirect|replace|jQuery|results|append|clearTimeout|res|prototype|setTimeout|gi|param|false|call|clearInterval|again|unbind|posts|setInterval|starred|event|chat|bind|ready|null|500|prepend|format|pause|shift|delete|wrap|yahooapis|com|https|RegExp|ajax|expire|v1|public|else|trying|new|callback|yql|appendChild|body|toggleClass|empty|before|removeClass|removeAttr|after|typeof|toString|textContent|text|createElement|not'.split('|'),0,{}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment