This file contains hidden or 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 Wikipedia Watchlist Link | |
// @namespace https://vfdan.github.io | |
// @version 1.0 | |
// @description Makes the link in the Wikipedia dropdown watchlist link to the edit watchlist page | |
// @author VFDan | |
// @match *.wikipedia.org/* | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or 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
Math.median = (...nums) => { | |
nums.sort() | |
len = nums.length/2 | |
if (len%1) return nums[Math.floor(len)] | |
return mean(nums[len],nums[len-1]) | |
} | |
Math.mode = (...nums) => nums.reduce((a,b)=>a+b, 0)/nums.length |
This file contains hidden or 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
x=(__)=>'J'+ 'ava'+/// | |
'S'+ // | |
'c'+ 'ript!'// | |
/**/ /**/ // | |
console.log( x(1))//// |
This file contains hidden or 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
function addCSS(a,b,c){b.match(/-/)&&(b=b.replace(/-([a-z])/g,function(a){return a[1].toUpperCase()}));for(var d=document.querySelectorAll(a),e=d.length,f=0;f<e;f++)d[f].style[b]=c}function addCSSRules(a){var b,c=document.createElement("style");document.head.appendChild(c),b=c.sheet;for(var d=0,e=a.length;d<e;d++){var f=1,g=a[d],h=a[d][0],k="";"[object Array]"===Object.prototype.toString.call(g[1][0])&&(g=g[1],f=0);for(var l,m=g.length;f<m;f++)l=g[f],k+=l[0]+":"+l[1]+(l[2]?" !important":"")+";\n";b.insertRule(h+"{"+k+"}",b.cssRules.length)}}!function(a){var b=a.insertRule;2===b.length&&(a.insertRule=function(c){t:for(var d=0,f=c.length,g=0,h=0;d!==f;++d){if(h=c.charCodeAt(d),!g&&123===h){for(var j=d,a=-1;d!==f;++d)h=c.charCodeAt(d),g||125!==h||(a=d),g^=92===h?1:g;if(-1==a)break t;return b.call(this,c.substring(0,j),c.substring(a),arguments[3])}g^=92===h?1:g}return b.call(this,c,"",arguments[2])})}(CSSStyleSheet.prototype); | |
/* How to use: | |
* addCSS(selector, property, value) | |
* * addCSS('div:first-of-type', 'c |
This file contains hidden or 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
function randomInt(min, max) { | |
min = Math.ceil(min); | |
max = Math.floor(max); | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
} |
This file contains hidden or 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
.if(@condition, @property, @value) when (@condition = true){ | |
@{property}: @value; | |
} | |
.emphasis(@bold: false, @italic: false, @underline: false, @overline: false){ | |
.if(@bold, font-weight, bold); | |
.if(@italic, font-style, italic); | |
.if(@underline, text-decoration, underline); | |
.if(@overline, text-decoration, overline); | |
} |