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 furaffinity.net | |
// @namespace furaffinity-downloadLinks | |
// @description furaffinity.net addons | |
// @include furaffinity.net* | |
// @version 0.1b | |
// ==/UserScript== | |
var myDocument | |
(function () { |
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
(()=>{ | |
const distribution = [8,12,20,12,10,20,17,1]; | |
console.log(distribution.reduce((x,y)=>x+y, 0)); | |
return (distribution.reduce(function (array, cur){ | |
const previous = array[array.length-1]|| [] | |
, previousRemoved = previous[0]||0 | |
, previousRemaining = previous[1]||100; | |
return array.concat([[cur, previousRemaining - previousRemoved]]); | |
}, []).map((x)=>x.join("/")).join(', ')); | |
})(); |