Greasy Fork 还支持 简体中文。

Remove GameFAQs "Would you recommend this guide?" Header

Removes the annoying "Would you recommend this guide?" header on every FAQ page.

  1. // ==UserScript==
  2. // @name Remove GameFAQs "Would you recommend this guide?" Header
  3. // @namespace gameFARKZ
  4. // @version 1.0
  5. // @description Removes the annoying "Would you recommend this guide?" header on every FAQ page.
  6. // @include http://www.gamefaqs.com/*/*/faqs/*
  7. // @include https://www.gamefaqs.com/*/*/faqs/*
  8. // @include http://gamefaqs.gamespot.com/*/*/faqs/*
  9. // @include https://gamefaqs.gamespot.com/*/*/faqs/*
  10. // @author jakenastysnake
  11. // @grant none
  12. // @noframes
  13. // ==/UserScript==
  14.  
  15. // Remove the header div when it is loaded.
  16. function removeHeader(header) {
  17. header.remove();
  18. }
  19.  
  20. // Set up a MutationObserver to check for changes in DOM
  21. // (Needed since header is not loaded until you scroll down the page)
  22. // Mutations: This is an array that holds any mutations or changes that have occurred.
  23. // Me: This is the MutationObserver instance.
  24. var observer = new MutationObserver(function (mutations, me) {
  25. var header = document.getElementById('faq_header_wrap');
  26. if (header) {
  27. removeHeader(header);
  28. me.disconnect(); // Stop the MutationObserver.
  29. return;
  30. }
  31. });
  32.  
  33. // Start the MutationObserver.
  34. observer.observe(document, {
  35. childList: true,
  36. subtree: true
  37. });