Last active
August 29, 2015 14:03
-
-
Save oxpa/f45c695b231e87844c9c to your computer and use it in GitHub Desktop.
9gag nsfw to image v2
This file contains hidden or 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 9gag.test | |
// @namespace 9gag.com | |
// @description test | |
// @include http://9gag.com/gag/* | |
// @exclude http://9gag.com/hot | |
// @exclude http://9gag.com/gif | |
// @version 2 | |
// @run-at document-end | |
// @grant none | |
// ==/UserScript== | |
this.$=this.jQuery=jQuery.noConflict(true); | |
pst=(window.location.pathname).split("/").slice(-1)[0]; | |
pst=GAG.Configs._configs.data.fast_entries.items[pst].pinImg; | |
IMG="<img alt='' src='"+pst+"' class='badge-item-img wasnothere'>"; | |
IMG2="<img alt='' style='position:absolute; left:0px;top:0px;' src='"+ pst +"' class='badge-item-img wasnothere'>"; | |
IMG2=IMG2.replace(/700b/,"460sa"); | |
$('.nsfw-post').replaceWith(IMG+IMG2); | |
$('.wasnothere').parent().removeClass("badge-nsfw-entry-cover"); | |
$('.wasnothere').parent().addClass("badge-post-zoom zoomable"); | |
$('.wasnothere').attr("href","javascript: void(0)"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment