Browse Source

add initial NSFW support

master
kaos 10 years ago
parent
commit
8186212048
1 changed files with 16 additions and 1 deletions
  1. +16
    -1
      main.js

+ 16
- 1
main.js View File

@ -134,9 +134,24 @@ function isNightTime(){
return false;
}
function showNSFW(){
jQuery(".badge-nsfw-entry-cover").each(function() {
jQuery(this).addClass("deobfuscated");
jQuery(this).html(jQuery('<img/>', {src: "http://img-9gag-fun.9cache.com/photo/" + jQuery(this).parents("article").data("entry-id") + "_460s.jpg",}));
});
}
//init everything
jQuery(document).ready(function() {
updatingDom = false;
showNSFW();
jQuery(".main-wrap").on("DOMNodeInserted", function() {
if (!jQuery("#jsid-upload-menu").not(".deobfuscated").is(":visible") && !updatingDom){
updatingDom = true;
showNSFW();
updatingDom = false;
}
});
setLongPostListener();
cleanWakeUp();
currentVideo = setupVideoObject();


Loading…
Cancel
Save