🏠 Home 

Keylol论坛Steam数据库直达

steam数据库直达


安装此脚本?
作者推荐脚本

您可能也喜欢Keylol Game Info Clipboard


安装此脚本
  1. // ==UserScript==
  2. // @name Keylol论坛Steam数据库直达
  3. // @namespace out
  4. // @version 0.21
  5. // @description steam数据库直达
  6. // @author MARK2333
  7. // @support
  8. // @exclude http*://keylol.com/home.php*
  9. // @match http*://keylol.com/*
  10. // @match http*://*.keylol.com/*
  11. // @grant GM_addStyle
  12. // @require https://cdn.bootcss.com/clipboard.js/2.0.1/clipboard.min.js
  13. // @require https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js
  14. // ==/UserScript==
  15. (function() {
  16. $(document).ready(function(){
  17. var clipboard = new ClipboardJS('.button');
  18. clipboard.on('success', function(e) {
  19. var btnTarget = $(e.trigger);
  20. var btnText = btnTarget.text();
  21. btnTarget.removeClass('button-border');
  22. btnTarget.addClass('button-highlight');
  23. setTimeout(function(){
  24. btnTarget.text(btnText);
  25. btnTarget.removeClass('button-highlight');
  26. btnTarget.addClass('button-border');
  27. },3000);
  28. });
  29. //获取所有steam链接
  30. var allGamesLink = document.querySelectorAll('.steam-info-link');
  31. //遍历
  32. for(var i = 0;i < allGamesLink.length;i++){
  33. var game = allGamesLink[i];
  34. //游戏名
  35. var gameName = $(game).text();
  36. //游戏链接
  37. var gameLink = game.getAttribute('href');
  38. //APPID
  39. var appId,appIdList = gameLink.match(/[0-9]+/);
  40. if(appIdList>0){
  41. appId = appIdList[0];
  42. }
  43. //添加样式
  44. $(game).after('<a href="https://steamdb.info/app/' + appId + '"target="_blank"><img src="https://s3.ax1x.com/2021/03/14/60OmbF.png" width="20" height="20" border="0"></img></a>');
  45. }
  46. })
  47. })();