Skip Promoted Posts Script

Detects promoted posts and presses the next button

  1. // ==UserScript==
  2. // @name Skip Promoted Posts Script
  3. // @namespace http://heyisthisusernametaken.com/skip_promoted
  4. // @version 0.2
  5. // @description Detects promoted posts and presses the next button
  6. // @author heyisthisusernametaken
  7. // @match http://imgur.com/*
  8. // @require http://code.jquery.com/jquery-latest.js
  9. // @grant click
  10. // ==/UserScript==
  11.  
  12. console.log('Loading "Skip Promoted Posts" script');
  13. //Determine if post is promoted
  14. if (document.getElementsByClassName("promoted-tag").length > 0) {
  15. console.log('Promoted post detected');
  16. // Press the next button
  17. var nextBtns = document.getElementsByClassName("navNext");
  18. $(window).bind("load", function() {
  19. console.log("Skipping promoted post");
  20. nextBtns[0].click();
  21. });
  22. } else {
  23. //console.log("not a promoted post");
  24. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址