Last active
January 23, 2018 11:44
-
-
Save bell/aac3b4567e747755d9728d213ae23d6f to your computer and use it in GitHub Desktop.
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 vg-beutyfier | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Make VG.no look better | |
// @author You | |
// @match https://www.vg.no/ | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
['', '-ms-', '-webkit-', '-o-', '-moz-'].map(function(prefix){ | |
Array.prototype.slice.call(document.querySelectorAll('img')).map(function(el){ | |
let choice = Math.trunc(Math.random()*100); | |
if (choice >= 95) { | |
el.src = '//codebox.org.uk/graphics/bieber.jpg'; | |
} else if (choice < 10) { | |
el.style[prefix + 'transform'] = 'rotate(180deg)'; | |
} | |
}); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment