Skip to content

Commit

Permalink
更新浏览器支持状态, 修复 Firefox 支持
Browse files Browse the repository at this point in the history
  • Loading branch information
Cat7373 committed Nov 26, 2015
1 parent 6cafd48 commit 985351f
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions remove_web_limits.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@
// @updateURL https://cat7373.github.io/remove-web-limits/remove_web_limits.user.js

// @author Cat73
// @version 1.1.2
// @version 1.1.3
// @license LGPLv3

// @compatible chrome 完美支持
// @compatible firefox 未测试
// @compatible opera 未测试
// @compatible firefox 完美支持
// @compatible opera 完美支持
// @compatible safari 未测试

// @include http://*
// @include https://*
// @match *://*/*
// @grant GM_addStyle
// @grant GM_log
// @grant none
// @run-at document-start
// ==/UserScript==

Expand Down Expand Up @@ -87,6 +86,15 @@ function getElements() {
return elements2;
}

// 添加css
function addStyle(css) {
var head = document.getElementsByTagName('head')[0];
var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}

// 初始化
function init() {
// hook addEventListener
Expand All @@ -102,10 +110,10 @@ function init() {
clearLoop();

// 添加CSS
GM_addStyle('html, * {-webkit-user-select:text!important; -moz-user-select:text!important;}');
addStyle('html, * {-webkit-user-select:text!important; -moz-user-select:text!important;}');

// 输出原始 addEventListener 位置
GM_log('原始 addEventListener 名称:' + addEventListenerName);
console.debug('原始 addEventListener 名称:' + addEventListenerName);
}

init();

0 comments on commit 985351f

Please sign in to comment.