Author Topic: Uploadius [voting system]  (Read 41959 times)

i'd laugh my ass off is Swollow's site was being tracked by FBI/NSA or some stuff lol

this furry :panda: is nasty wtf

I added a content viewer thingy

guess what boys the computer i brought on vacation has even more tits for the world

I added a content viewer thingy

aaaand hoverzoom is broken


good
why are you so bitter about this
he wrote a userscript to make the website better without hurting you or anyone else

why are you so bitter about this
he wrote a userscript to make the website better without hurting you or anyone else
because he decided to insert his name underneath my header title

here is a fix
Code: [Select]
// ==UserScript==
// @name        Uploadius Hover Zoom
// @namespace   uploadiushoverzoom
// @include     http://swololol.com/*
// @version     1
// @grant       none
// ==/UserScript==
var links = document.getElementsByTagName("a");
var imageLinks = [];
for(var i = 0; i < links.length; i++) {
    if(/\.(jpg|gif|png|jpeg)$/.test(links[i].href.replace('?view=','/'))) {
        imageLinks.push(links[i]);
    }
}
var documentHeight = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight);
//http://stackoverflow.com/questions/1145850/how-to-get-height-of-entire-document-with-javascript
for(var i = 0; i < imageLinks.length; i++) {
    var currentLink = imageLinks[i];
    currentLink.onmouseenter = function(cursorEvent) {
        var x = cursorEvent.clientX;
        var y = cursorEvent.clientY;
        window.hoverImg = document.createElement("img");
        window.hoverImg.src = this.href.replace('?view=','/');
        if(documentHeight - y < 300) {
            window.hoverImg.setAttribute("style", ("position: absolute; top:" + (y+document.body.scrollTop-250) + "px; left:" + (x+document.body.scrollLeft+5) + "px; width: auto; max-height: 250px"));
        } else {
            window.hoverImg.setAttribute("style", ("position: absolute; top:" + (y+document.body.scrollTop) + "px; left:" + (x+document.body.scrollLeft+5) + "px; width: auto; max-height: 250px"));
        }
        document.body.appendChild(window.hoverImg);
    }
    currentLink.onmouseleave = function() {
        document.body.removeChild(window.hoverImg);
        window.hoverImg = {};
    }
    currentLink.onmouseout = function() {
        document.body.removeChild(window.hoverImg);
        window.hoverImg = {};
    }
}
« Last Edit: June 23, 2015, 04:41:15 AM by Swollow »

I will be adding some sort of similar feature soon however

because he decided to insert his name underneath my header title
ok so

W7 needs to stop ruining my favorite characters

I think we should be able to comment on pictures

There should also be a button that let's you go to other pages and see past uploads.

I think we should be able to comment on pictures
Yes, this would be another nice feature to implement.



Try turning your console off and on.