所有分类
  • 所有分类
  • 网站源码
  • 游戏源码
  • 小程序
  • 网页特效
  • 软件工具

油猴脚本 steam一键搜索离线账号

油猴脚本 steam一键搜索离线账号

运行环境:脚本猫
更新时间:2023/8/2

// ==UserScript==
// @name steam search
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 查找游戏离线账号
// @AuThor You
// @match *://store.steampowered.com/app/*
// @Icon https://www.google.com/s2/favicons?sz=64&domain=52pojie.cn
// @grant GM_xmlhttpRequest
// ==/UserScript==
(function() {
'use strict';
var 父级 = document.getElementsByClassName("store_nav")[0];
var 副本 = document.createElement('div');
副本.innerHTML = '<span>找号</span>';
副本.setAttribute("class", "tab ");
父级.appendChild(副本);
var AppName = document.getElementById('appHubAppName')
.textContent;
var Appid = /app\/(\d+)/.exec(window.location.href)[1];
副本.onclick = () => {
console.log(AppName);
console.log(Appid);
console.log("https://ttgame.app/zh/home.php?page=1&limit=999&query=" + AppName);
GM_xmlhttpRequest({
method: "GET",
url: "https://ttgame.app/zh/home.php?page=1&limit=999&query=" + encodeURIComponent(AppName),
headers: {
"User-Agent": "Mozilla/5.0",
"Accept": "application/json"
},
onload: function(response) {
var jsonData = JSON.parse(response.responseText);
if (Array.isArray(jsonData)) {
var extractedData = jsonData.map(item => ({
gameName: item.gameName,
userName: item.userName,
password: item.password,
ssfn: item.ssfn
}));
console.log(extractedData);
openNewPage(JSON.stringify(extractedData), Appid); // 传递Appid
} else {
console.log(jsonData);
openNewPage(JSON.stringify(jsonData), Appid); // 传递Appid
}
}
});
}
function openNewPage(data, Appid) { // 添加Appid参数
var newWindow = window.open("", "_blank");
newWindow.document.write("<html><head><title>Steam搜索结果</title>");
newWindow.document.write("<style>");
newWindow.document.write("body { font-family: Arial, sans-serif; background-image: url('background.jpg'); background-size: cover; }");
newWindow.document.write("h1 { text-align: center; color: #fff; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); }");
newWindow.document.write("table { width: 100%; border-collapse: collapse; }");
newWindow.document.write("th, td { padding: 8px; text-align: left; border-bottom: 1px solid #ddd; color: #fff; background-color: rgba(0, 0, 0, 0.5); }");
newWindow.document.write("tr:nth-child(even) { background-color: rgba(255, 255, 255, 0.1); }");
newWindow.document.write("@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }");
newWindow.document.write("tr { animation: fadeIn 0.5s ease-in-out; }");
newWindow.document.write("</style>");
newWindow.document.write("</head><body>");
newWindow.document.write("<h1>Steam搜索结果</h1>");
newWindow.document.write("<table>");
newWindow.document.write("<tr><th>游戏名称</th><th>用户名</th><th>密码</th><th>SSFN</th><th>App ID</th></tr>");
var extractedData = JSON.parse(data);
extractedData = Object.values(extractedData);
for (var i = 0; i < extractedData[3].length; i++) {
var item = extractedData[3][i];
// 打印参数值
newWindow.document.write("<tr>");
newWindow.document.write("<td>" + item.gameName + "</td>");
newWindow.document.write("<td>" + item.userName + "</td>");
newWindow.document.write("<td>" + item.password + "</td>");
newWindow.document.write("<td>" + item.ssfn + "</td>");
newWindow.document.write("<td>" + Appid + "</td>");
newWindow.document.write("</tr>");
}
newWindow.document.write("</table></body></html>");
newWindow.document.close();
}
})();

下载说明:
1、本站所有资源均从互联网上收集整理而来,仅供学习交流之用,因此不包含技术服务请大家谅解!
2、本站不提供任何实质性的付费和支付资源,所有需要积分下载的资源均为网站日常活跃所需,积分可通过日常活跃免费获得!
3、本站所有资源仅用于学习及研究使用,您必须在下载后的24小时内删除所下载资源,切勿用于商业用途,否则由此引发的法律纠纷及连带责任本站和发布者概不承担!
4、本站站内提供的所有可下载资源,本站保证未做任何负面改动(不包含修复bug和完善功能等正面优化或二次开发),但本站不保证资源的准确性、安全性和完整性,用户下载后自行斟酌,我们以交流学习为目的,并不是所有的源码都100%无错或无bug!如有链接无法下载、失效或广告,请联系客服处理!
5、本站资源除标明原创外均来自网络整理,版权归原作者或本站特约原创作者所有,如侵犯到您的合法权益,请立即告知本站,本站将及时予与删除并致以最深的歉意!
6、如果您也有好的资源或教程,您可以投稿发布,成功分享后有站币奖励,同时还能获得对应的人气!
7、如果您喜欢该资源,请支持官方正版资源,以得到更好的正版服务!
8、请您认真阅读上述内容,注册本站用户或下载本站资源即您同意上述内容!
原文链接:http://www.yonghengzy.cn/blog/45498.html,转载请注明出处。

0
分享海报

评论0

请先
显示验证码

社交账号快速登录