CMG Hacks for Safari

A port of my chrome extension (CMG Hacks) for safari!

目前為 2022-12-10 提交的版本,檢視 最新版本

// ==UserScript==
// @name CMG Hacks for Safari
// @homepage http://youtube.com/theostechtips
// @author Theo's Tech Tips
// @description A port of my chrome extension (CMG Hacks) for safari!
// @grant none
// @match *://www.coolmathgames.com/0-*
// @version 1.0
// @license MIT
// @namespace https://greasyfork.org/users/995648
// ==/UserScript==
str = "<a href='javascript:cmg_remove_padg();' id='asdsdafdfsfwefeweweefwefwefwfffffffffff' class='btn btn-primary btn-sm'>Skip Ad</a> <button id='bigScreen' class='btn btn-primary btn-sm'>Fullscreen</button>"
 var div = document.querySelector(".pane-title");

 div.insertAdjacentHTML( 'beforeend', str );

document.querySelector("#bigScreen").onclick = function(){
  var elem = document.getElementById("swfgamewrapper");
   elem.webkitRequestFullScreen();
}

document.querySelector("#asdsdafdfsfwefeweweefwefwefwfffffffffff").onclick = function() {
  if (document.body.contains(document.querySelector(".blocker-detected-2"))) {
      document.querySelector(".blocker-detected-2").remove();
  }
}

  
 if (window.location.href.indexOf("https://www.coolmathgames.com/0-chess") > -1) {
   document.querySelector("#bigScreen").style.display = "none";
 }