Skip to content

Instantly share code, notes, and snippets.

@oxpa
Last active August 29, 2015 14:03
Show Gist options
  • Save oxpa/f45c695b231e87844c9c to your computer and use it in GitHub Desktop.
Save oxpa/f45c695b231e87844c9c to your computer and use it in GitHub Desktop.
9gag nsfw to image v2
// ==UserScript==
// @name 9gag.test
// @namespace 9gag.com
// @description test
// @include http://9gag.com/gag/*
// @version 2
// @grant none
// ==/UserScript==
this.$ = this.jQuery = jQuery.noConflict(true);
IMG="<img alt='' src='"+$("article").attr("data-entry-thumbnail-url").replace(/92x92/,"700b")+"' class='badge-item-img wasnothere'>";
IMG2="<img alt='' style='position:absolute; left:0px;top:0px;' src='"+$("article").attr("data-entry-thumbnail-url").replace(/92x92/,"460sa")+"' class='badge-item-img wasnothere'>";
$('.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