Greasy Fork is available in English.

remove page limit

Remove various page limit, check the code for the page list.

اعتبارا من 28-01-2018. شاهد أحدث إصدار.

// ==UserScript==
// @namespace ATGT
// @name     remove page limit
// @name:zh-CN     解除网页限制
// @description 	Remove various page limit, check the code for the page list.
//                      quora.com: Remove login page
//                      360doc.com: Remove copy limit
//											baidu.com: Remove baidu calculator select limit
// @description:zh-CN 	解除各种网页限制。网页列表,请查看源代码。
// @version  1.1
// @include    http*://*quora.com/*
// @include    http*://*360doc.com/*
// @include    http*://*baidu.com/*
// @run-at   document-start
// ==/UserScript==


console.log("!!!!!!!!!!!!!!!!!!!!!unlock-page!!!!!!!!!!!!!!!!!!!!!!!!");
(function () {
  function quoraHandler() {
    console.log(new Date().toLocaleString(), " ", arguments.callee.name);
		for (var d of document.body.childNodes) {
      if (/signup_wall_wrapper$/.test(d.id)) {
        d.remove();
        break;
      }
    }
    document.body.style.overflow = "visible";
  }
  function replaceAddEventListener() {
    var r0_EventTargetRegFunc = EventTarget.prototype.addEventListener;
    var r1_documentRegFunc = document.addEventListener;
    function dummyRegFunc (type, listener, options) {
      console.log("dummyRegFunc", this, type, listener, options);
    }
    EventTarget.prototype.addEventListener = dummyRegFunc;
    document.addEventListener = dummyRegFunc;
  }
  
  function injectFunction (func) {
    var script = document.createElement('script');
    script.appendChild(document.createTextNode('('+ func +')();'));
    (document.body || document.head || document.documentElement).appendChild(script);
  }
  //console.log(""+injectFunction);
  //injectFunction(replaceAddEventListener);
  
  function enableUserSelect(sel) {
    if (sel)
      var b = document.querySelector(sel);
    else
      var b = document.body;
    var uselattrs = [ "-webkit-touch-callout", 
                     "-webkit-user-select", 
                     "-khtml-user-select",
                     "-moz-user-select",
                     "-ms-user-select",
                     "user-select",
                    ];
    for (var usel of uselattrs) {
      try {
        if (usel in b.style)
            b.style[usel] = "text";
      } catch (e) {
        console.log(e);
      }
    }
  }
  
  function enableCopyHandler() {
    var b = document.body;
    var d = document;
    console.log(new Date().toLocaleString(), " ", arguments.callee.name);
    b.onclick = b.oncontextmenu = b.oncopy =
      b.onmouseup = b.onselectstart = null;
    d.onclick = d.oncontextmenu = d.oncopy =
      d.onmouseup = d.onselectstart = null;
  }
  
  var pageHandlers = [
    /* !!! Need to add the global match to @include also */
    [/quora\.com/, quoraHandler],
    [/360doc\.com/, enableCopyHandler, 500],
    [/baidu\.com/, enableUserSelect, 500, ".op_new_cal_screen"]
  ];
  
  for (var ph of pageHandlers) {
    if (ph[0].test(location.href)) {
      console.log(new Date().toLocaleString(), " handle ", ph[0]);
      setTimeout(ph[1], ph[2] ? ph[2] : 0, ph[3]);
    }
  }
})();

console.log("!!!!!!!!!!!!!!!!!!!!!/unlock-page!!!!!!!!!!!!!!!!!!!!!!!!");