text
stringlengths
0
173k
}
},
removeCSS: (id) => {
const style = document.getElementById(id);
style && document.getElementsByTagName("head")[0].removeChild(style);
}
};
const stopNativePropagation = (event) => event.stopPropagation();
const CONTROLLER_MAP = [
{
status: BUTTON_STATUS.CLOSE,
storageKey: "selectstart-and-copy",
openName: "✅ 启动解除复制限制",
closeName: "❌ 关闭解除复制限制",
openFunction: () => {
document.addEventListener("selectstart", stopNativePropagation, true);
document.addEventListener("copy", stopNativePropagation, true);
utils.insertCSS(
STORAGE_KEY_PREFIX + "selectstart-and-copy",
"*{user-select: auto !important;-webkit-user-select: auto !important;}"
);
},
closeFunction: () => {
document.removeEventListener("selectstart", stopNativePropagation, true);
document.removeEventListener("copy", stopNativePropagation, true);
utils.removeCSS(STORAGE_KEY_PREFIX + "selectstart-and-copy");
}
},
{
status: BUTTON_STATUS.CLOSE,
storageKey: "contextmenu",
openName: "✅ 启动解除右键限制",
closeName: "❌ 关闭解除右键限制",
openFunction: () => document.addEventListener("contextmenu", stopNativePropagation, true),
closeFunction: () => document.removeEventListener("contextmenu", stopNativePropagation, true)
},
{
status: BUTTON_STATUS.CLOSE,
storageKey: "keydown",
openName: "✅ 启动解除键盘限制",
closeName: "❌ 关闭解除键盘限制",
openFunction: () => document.addEventListener("keydown", stopNativePropagation, true),
closeFunction: () => document.removeEventListener("keydown", stopNativePropagation, true)
}
];
(function() {
register(CONTROLLER_MAP);
})();
})();
<_EOF_>
// ==UserScript==
// @name 饰品比例计算脚本
// @namespace out
// @version 1.9
// @description 买买买
// @author out
// @icon https://store.steampowered.com/favicon.ico
// @match *://www.c5game.com/*
// @match *://buff.163.com/*
// @match *://www.igxe.cn/product/*
// @match *://www.v5fox.com/*
// @grant GM_xmlhttpRequest
// @grant GM_addStyle
// @grant GM_openInTab
// @grant GM_notification
// @grant GM_getValue
// @grant GM_setValue
// @require https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js
// @connect steamcommunity.com
// @supportURL https://steamcn.com/t331397-1-1
// ==/UserScript==
const $ = window.jQuery;
var site;
var low;
var high;
(function() {
'use strict';
// Your code here...
$(document).ready(function(){
start(query);
});
})();
function start(){
var name,appid;
if($(".steamUrl").length!== 0){
site = "c5";
query($(".steamUrl a").attr("href"));
}else if($('div.detail-summ > a').length !== 0){
site = "buff";
query($('div.detail-summ > a').attr("href"));
}else if($('div.productInfo').length !== 0){
name = $('.productInfo .name').text();
appid = window.location.href.match(/product\/(\d+)/)[1];
site = "ig";
getItemUrl(appid,name);