restore my rights
@@ -2,21 +2,34 @@
* @title restore my rights
* @description (x_x)
* @include http://*
+ * @include https://*
+ * @contributor yuta25 http://let.hatelabo.jp/yuta25/let/hLHWnL_HmJof
* @license MIT License
- * @require
+ * @javascript_url
*/
(function() {
- var elems = document.querySelectorAll('*');
- for (var i = 0,length = elems.length; i < length; i++) {
- elems[i].setAttribute('unselectable', 'off');
- elems[i].onmousedown = null;
- elems[i].oncontextmenu = null;
- elems[i].onselectstart = null;
- elems[i].style['user-select'] = 'initial';
- elems[i].style['-webkit-user-select'] = 'initial';
- }
- if (typeof $ !== "undefined") {
- $('*').unbind();
+ Array.prototype.forEach.call(document.body.querySelectorAll('*'), function(node) {
+ node.setAttribute('unselectable', 'off');
+ node.onmousedown = null;
+ node.oncontextmenu = null;
+ node.onselectstart = null;
+ //node.onselect = null;
+ node.oncopy = null;
+ node.oncut = null;
+
+ [
+ '',
+ '-webkit-',
+ '-khtml-',
+ '-ms-',
+ '-o-'
+ ].forEach(function(prefix) {
+ node.style[prefix + 'user-select'] = 'initial';
+ });
+ });
+
+ if (jQuery) {
+ jQuery('*').unbind();
}
}());
(function() {
Array.prototype.forEach.call(document.body.querySelectorAll('*'), function(node) {
node.setAttribute('unselectable', 'off');
node.onmousedown = null;
node.oncontextmenu = null;
node.onselectstart = null;
node.oncopy = null;
node.oncut = null;
[
'',
'-webkit-',
'-khtml-',
'-ms-',
'-o-'
].forEach(function(prefix) {
node.style[prefix + 'user-select'] = 'initial';
});
});
if (jQuery) {
jQuery('*').unbind();
}
}());
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。