[-]
Shout Box
Shout: -
User Panel
Loading...
Smilies
MyCode
Colors
For "Technical Support" on making themes, tutorials etc then please make a forum post about it and not the shoutbox. Also check the HELP ME!! forum first.
Your shoutbox post will be deleted if we determine that it should have been posted in the forums instead.
View Full Shout Box

Post Reply 
Javascript / CSS hacks
Author Message
Deak Phreak Offline
Super Spiffy Admin
*******

Deak Phreak

Posts: 831
Joined: Nov 2009
Post: #1
Javascript / CSS hacks
I will post my various code you can use when browsing sites to help you get what you want faster Icon_smile Feel free to post requests and I will do what I can. In order to use the javascript code, you must download the firefox addon greasemonkey and for CSS code, you must download the firefox addon stylish. This is mainly for my own personal use and for the stylish plugins, I modify the site to fit my preferences. These are up here so you may also use them if you find them useful.


Image HostingPlugin: greasemonkey

Description: This will show the image directly without all the hoops some of the sites make you go through. If you have a site that needs to be added, then send me a link so I can code it in. Please make sure you have the latest greasemonkey add-on.

Code:
// ==UserScript==
// @name           Website Images
// @namespace      Home
// @description    Show Various Images
// @include        *picswan.com*
// @include        *pixsor.com*
// @include        *bayimg.com*
// @include        *seedimage.com*
// @include        *pixoloid.com*
// @include        *freebunker.com*
// @include        *imagefruit.com*
// @include        *imagesnake.com*
// @include        *dumppix.com*
// @include        *phyrefile.com*
// @include        *desibbrg.net*
// @include        *vippix.com*
// @include        *imagenova.net*
// @include        *piratepix.org*
// @include        *starpix.us*
// @include        *imagehyper.com*
// @include        *4ufrom.me*
// @include        *pictureturn.com*
// ==/UserScript==
function rtrim(stringToTrim, TrimStr) {
    var len = stringToTrim.length;
    var last_char = stringToTrim.charAt(len - 1);
    if(last_char == TrimStr) {
        stringToTrim = stringToTrim.substring(0,len - 1);
    }
    return stringToTrim;
}

var urlpath = document.baseURI;

// take care of any url that has share- in the url
if(urlpath.search("share-") > 0) {

    urlarray = urlpath.split('share-');
    document.location = rtrim(urlarray[0], '/') + '/image-'+urlarray[1].replace(".html", ".jpg");

}// take care of any url that has share- in the url
else if(urlpath.search("share.php") > 0) {

    if(document.getElementById('share_image')) {
        document.location = urlpath.replace("share.php", "image.php");
    }

} else if(urlpath.search("imagehyper.com") > 0) {

    if(document.getElementById('ab')) {
        var imgpath = document.getElementById('ab').offsetParent.firstElementChild.src;
        document.location = imgpath;
    }
} else if(urlpath.search("picswan.com") > 0) {

    if(document.getElementById('img_obj')) {
        var imgpath = document.getElementById('img_obj').src;
        document.location = imgpath;
    } else if(document.getElementById('imagecode')) {
        document.getElementById('imagecode').style.visibility = '';
    }
} else if(urlpath.search("vippix.com") > 0) {

    urlarray = urlpath.split('share-');
    document.location = rtrim(urlarray[0], '/') + '/image.php?id='+urlarray[1].replace(".html", "");

} else if(urlpath.search("4ufrom.me") > 0) {

    urlarray = document.URL.split('file=');
    document.location = 'http://4ufrom.me/files/' + urlarray[1];

} else if(urlpath.search("pictureturn.com") > 0) {

    if(document.getElementById('looz1oo')) {
        var imgpath = document.getElementById('looz1oo').src;
        document.location = imgpath;
    }

} else if(urlpath.search("imagenova.net") > 0) {

    if(document.getElementById('imagen')) {
        var imgpath = document.getElementById('imagen').firstChild.href;
        document.location = imgpath;
    }

} else if(urlpath.search("bayimg.com") > 0) {

    if(document.getElementById('mainImage')) {
        var imgpath = document.getElementById('mainImage').src;
        document.location = imgpath;
    }

} else if(urlpath.search("seedimage.com") > 0 || urlpath.search("desibbrg.net") > 0 || urlpath.search("piratepix.org") > 0) {

    var imgpath = document.getElementById('img_obj').src;
    document.location = imgpath;

} else if(urlpath.substring(0,23) == 'http://www.pixoloid.com' || urlpath.substring(0,19) == 'http://pixoloid.com') {

    var imgpath = document.getElementById('page_body').children[1].children[0].src;
    document.location = imgpath;

} else if(urlpath.substring(0,30) == 'http://www.freebunker.com/img/' || urlpath.substring(0,26) == 'http://freebunker.com/img/') {

    var imgpath = document.getElementById('img_obj').src;
    document.location = imgpath;

} else if(urlpath.substring(0,30) == 'http://www.imagefruit.com/img/' || urlpath.substring(0,26) == 'http://imagefruit.com/img/') {

    var imgpath = document.getElementById('img_obj').src;
    document.location = imgpath;

} else if(urlpath.substring(0,33) == 'http://www.imagesnake.com/img.php' || urlpath.substring(0,29) == 'http://imagesnake.com/img.php') {

    var imgpath = document.getElementById('img_obj').src;
    document.location = imgpath;

} else if(urlpath.substring(0,22) == 'http://www.dumppix.com' || urlpath.substring(0,18) == 'http://dumppix.com') {

    var imgpath = document.getElementById('boring').src;
    document.location = imgpath;

} else if(urlpath.substring(0,36) == 'http://www.phyrefile.com/image/view/' || urlpath.substring(0,32) == 'http://phyrefile.com/image/view/') {

    var imgpath = document.getElementById('main_content').children[0].children[0].href;
    document.location = imgpath;

}



The Pirate BayPlugin: stylish

Description: This will remove all the extra "fluff" on the site and make the torrent table wider.

Code:
@-moz-document url-prefix(http://thepiratebay.org), url-prefix(https://thepiratebay.org
{
.ads, .ad, #sky-right, #main-content iframe, #foot iframe, .searchfield h1:first-child, #topright, #footer, #open-software, #fbanners, #TPBlogo
{
display: none !important;
}
#main-content
{
margin: 0px !important
}
}



BlackCats-GamesPlugin: stylish

Description: This will remove all the extra "fluff" on the site and make the view more focused on viewing the torrents.

Code:
@-moz-document url-prefix(http://www.blackcats-games.net),url-prefix(http://blackcats-games.net)
{
#side_bar_right, #menu_bar, #bannerbgcell
{
display: none !important;
}
#pagescontainer
{
width: 96% !important;
float: none !important;
}
}




Psx-ScenePlugin: stylish

Description: This will remove all the many ads posted all over the place.

Code:
@-moz-document url-prefix(http://psx-scene.com/forums)
{
table.page center, div.page div center, body center td > table:nth-of-type(3), body center td > table:nth-of-type(2)
{
display: none !important;
}
table.page > tbody > tr td[width="160"], table.page > tbody > tr td[width="125"]
{
display: none !important;
}
}







ps3newsPlugin: stylish

Description: This will remove all the many ads posted all over the place. and resize the forums to a better looking format.

Code:
@-moz-document url-prefix(http://www.ps3news.com)
{
div#header2 div:first-child, a#bglink, div.news-summary > div[style="width: 100%; margin-top: 8px;"] > table
{
display: none !important;
}
body
{
background: black !important;
}
}
@-moz-document url-prefix(http://www.ps3news.com/forums)
{
body > div:first-child, body > div[style="width: 20%; float: left;"], ins, td.alt1 > div > div[style="display: block; float: left; margin: 4px 5px 5px 1px;"], td.alt2 > div > div[style="display: block; float: left; margin: 4px 5px 5px 1px;"]
{
display: none !important;
}
body > div > div[style="width: 80%; float: right; text-align: left;"]
{
width: 100% !important;
float: none !important;
}
body > div[style="padding-left: 15px; padding-right: 15px;"]
{
padding-left: 0px !important;
padding-right: 0px !important;
}
}

12-09-2010 06:48 PM
Send this user a private message Visit this user's website Find all posts by this user Quote this message in a reply
NewYears1978 Offline
Modskin
***

Posts: 218
Joined: Jul 2010
Post: #2
RE: Javascript / CSS hacks
That's pretty sweet stuff right there.

Don't forget to check out my FSD Theme: Starkiller
12-10-2010 05:49 AM
Send this user a private message Find all posts by this user Quote this message in a reply
Deak Phreak Offline
Super Spiffy Admin
*******

Deak Phreak

Posts: 831
Joined: Nov 2009
Post: #3
RE: Javascript / CSS hacks
Added thepiratebay and blackcats-games

12-10-2010 07:37 AM
Send this user a private message Visit this user's website Find all posts by this user Quote this message in a reply
NewYears1978 Offline
Modskin
***

Posts: 218
Joined: Jul 2010
Post: #4
RE: Javascript / CSS hacks
Woo blackcats be nice, had I an account there Icon_smile

Don't forget to check out my FSD Theme: Starkiller
12-10-2010 10:53 AM
Send this user a private message Find all posts by this user Quote this message in a reply
Deak Phreak Offline
Super Spiffy Admin
*******

Deak Phreak

Posts: 831
Joined: Nov 2009
Post: #5
RE: Javascript / CSS hacks
Updated the image hosting script to be more universal

12-23-2010 08:17 AM
Send this user a private message Visit this user's website Find all posts by this user Quote this message in a reply
Deak Phreak Offline
Super Spiffy Admin
*******

Deak Phreak

Posts: 831
Joined: Nov 2009
Post: #6
RE: Javascript / CSS hacks
Added Psx-Scene.... That site is plastered with ads and makes it hard to read. Not anymore

01-22-2011 10:40 AM
Send this user a private message Visit this user's website Find all posts by this user Quote this message in a reply
NewYears1978 Offline
Modskin
***

Posts: 218
Joined: Jul 2010
Post: #7
RE: Javascript / CSS hacks
Reminder for PS3News script.

I can probably sort it out myself if I look into it..was looking just now but not quite working out. Icon_smile

Don't forget to check out my FSD Theme: Starkiller
01-28-2011 09:43 AM
Send this user a private message Find all posts by this user Quote this message in a reply
Deak Phreak Offline
Super Spiffy Admin
*******

Deak Phreak

Posts: 831
Joined: Nov 2009
Post: #8
RE: Javascript / CSS hacks
Updated the image hosting greasemonkey script to work with many image hosting sites.

04-30-2011 07:39 PM
Send this user a private message Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply