Bonk.io - Clean View

Hides everything on the bonk.io page except for the game itself

  1. // ==UserScript==
  2. // @name Bonk.io - Clean View
  3. // @description Hides everything on the bonk.io page except for the game itself
  4. // @version 1.0
  5. // @namespace https://greasyfork.org/users/945115
  6. // @match https://bonk.io/gameframe-release.html
  7. // @run-at document-start
  8. // @license The Unlicense
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. if(!window.bonkCodeInjectors) window.bonkCodeInjectors = [];
  13. window.bonkCodeInjectors.push(bonkCode => {
  14. try {
  15. window.top.document.getElementById("bonkioheader").remove()
  16. window.top.document.getElementById("descriptioncontainer").remove()
  17. window.top.document.body.getElementsByTagName("style")[0].innerHTML += "#maingameframe { margin: 0 !important; margin-top: 0 !important }"
  18. Array.prototype.at.call(window.top.document.body.getElementsByTagName("div"), -1).remove()
  19. return bonkCode;
  20. } catch (error) {
  21. alert(errorMsg);
  22. throw error;
  23. }
  24. });
  25.