Skip to content

Commit

Permalink
Add script to github.
Browse files Browse the repository at this point in the history
  • Loading branch information
VapaudenKuolemasta committed Jul 11, 2017
0 parents commit a3fb8d8
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions fusker.user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// ==UserScript==
// @id fusker
// @name fusker little helper
// @version 1.0
// @description Make a gallery with thumbs
// @include https://*.fusker.xxx/*
// @grant GM_addStyle
// ==/UserScript==

(function fusker_extention()
{
GM_addStyle(
'p {display: inline-block;padding: 5px;}'+
'img {max-width: 250px;display: inline-block;}'+
'#ikonas {display: block;}'
);

document.querySelectorAll('p').forEach(function(entry) {
if(entry.childNodes[2] != undefined){
var a = document.createElement('a');
a.setAttribute('href', entry.childNodes[0].nodeValue);
a.appendChild(entry.childNodes[2]);

entry.innerHTML = '';
entry.appendChild(a)
}
});
})();

0 comments on commit a3fb8d8

Please sign in to comment.