block

ominięcie blokad

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.cn-greasyfork.org/scripts/3865/12027/block.js

  1. function addJS_Node (text, s_URL, funcToRun, runOnLoad) {
  2. var D = document;
  3. var scriptNode = D.createElement ('script');
  4. if (runOnLoad) {
  5. scriptNode.addEventListener ("load", runOnLoad, false);
  6. }
  7. scriptNode.type = "text/javascript";
  8. if (text) scriptNode.textContent = text;
  9. if (s_URL) scriptNode.src = s_URL;
  10. if (funcToRun) scriptNode.textContent = '(' + funcToRun.toString() + ')()';
  11.  
  12. var targ = D.getElementsByTagName ('head')[0] || D.body || D.documentElement;
  13. targ.appendChild (scriptNode);
  14. }
  15.  
  16. function register_event(name, funcGM, funcInject)
  17. {
  18. unsafeWindow.addEventListener(name, exportFunction(funcGM, unsafeWindow), false);
  19. addJS_Node (null, null, funcInject);
  20. }
  21.  
  22. if(!cloneInto) { function cloneInto(obj) { return obj; } }
  23. if(!exportFunction) { function exportFunction(obj) { return obj; } }