steam Community Items link beta

add Community Items link

  1. // ==UserScript==
  2. // @name steam Community Items link beta
  3. // @description add Community Items link
  4. // @namespace steam_Community_Items_link
  5. // @author Covenant
  6. // @version 1.0.2
  7. // @license MIT
  8. // @homepage
  9. // @match https://store.steampowered.com/app/*
  10. // @match https://steamcommunity.com/market/*
  11. // @icon data:image/x-icon;base64,AAABAAEAEBAAAAEACABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAEAAAAAAAB1c3QAm6yhAFFWUwDA1cgAtra2ALm/vACPlpEAfHx8AGtvbQCMjIwAXltdAMXKxwANCQwAHBsbAP///wAJBgcA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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grant GM_setValue
  13. // @grant GM_getValue
  14. // @grant GM_registerMenuCommand
  15. // @grant GM_xmlhttpRequest
  16. // @connect steamcommunity.com
  17. // @run-at document-end
  18. // @noframes
  19. // ==/UserScript==
  20. var is_Community_Items_Exist=true;
  21. var is_avatar_Exist=true;
  22. function create_div(class_name,appendChild,node,refNode){
  23. var div=document.createElement("div");
  24. div.classList.add('block');
  25. div.classList.add(class_name);
  26. div.style.fontFamily="Arial, Helvetica,'Segoe UI Emoji','Noto Color Emoji','Noto Sans Mono','Meiryo','Noto Sans JP','Microsoft JhengHei','Noto Sans TC','Noto Sans Symbols 2', sans-serif";
  27. div.style.fontWeight="100";
  28. div.style.backgroundSize='contain';
  29. div.style.backgroundRepeat='no-repeat';
  30. if(appendChild){
  31. node.appendChild(div);
  32. }
  33. else{node.insertBefore(div, refNode);}
  34. return div;
  35. }
  36. function create_a(text,url,class_name){
  37. var anchor=document.createElement("a");
  38. anchor.href=url;
  39. anchor.innerText=text;
  40. anchor.classList.add('linkbar')
  41. anchor.classList.add(class_name);
  42. anchor.style.fontWeight="100";
  43. anchor.target="_blank";
  44. return anchor;
  45. }
  46. function fn_re_market_check(response){
  47. let dom=document.createRange().createContextualFragment(response.responseText);
  48. if(response.status==200){
  49. if(dom.querySelectorAll('div.market_sortable_column').length==0)is_Community_Items_Exist=false;
  50. var anchor=document.querySelectorAll('a.anchor_Items');
  51. for(let i = 0; i < anchor.length; i++){
  52. if(is_Community_Items_Exist){
  53. anchor[i].parentNode.classList.add('link_item');
  54. }
  55. else{anchor[i].style.display="none";}
  56. }
  57. anchor[0].parentNode.classList.add('checked_item');
  58. }
  59. else{//451
  60. console.log("market response.status: "+response.status+response.responseHeaders);
  61. }
  62. }
  63. function fn_re_avatar_check(response){
  64. if(response.status==200){
  65. if(response.finalUrl.search(new RegExp("/Avatar/List", "i"))==-1)is_avatar_Exist=false;
  66. var anchor=document.querySelectorAll('a.anchor_avatar')[0];
  67. if(is_avatar_Exist){
  68. anchor.parentNode.classList.add('link_avatar');
  69. }
  70. else{anchor.style.display="none";}
  71. anchor.parentNode.classList.add('checked_avatar');
  72. }
  73. else{//
  74. console.log("avatar response.status: "+response.status+response.responseHeaders);
  75. }
  76. }
  77. function fn_XMLHttpRequest(url,fn){
  78. GM_xmlhttpRequest({
  79. method: "GET",
  80. url: url,
  81. headers:{
  82. 'content-type': 'text/html; charset=UTF-8',
  83. 'user-agent':window.navigator.userAgent
  84. },
  85. onload: function (response){
  86. fn(response);
  87. console.log([
  88. "GM_xmlhttpRequest",
  89. response.status,
  90. response.statusText,
  91. response.readyState,
  92. response.responseHeaders,
  93. //response.responseText,
  94. response.finalUrl].join("\n")
  95. );
  96. }
  97. });
  98. }
  99.  
  100. (function() {
  101. 'use strict';
  102. var Community_check=GM_getValue('Community_check', false)
  103. var url=new URL(document.location);
  104. var appid;
  105. GM_registerMenuCommand('🔁check Community Items'+(Community_check?"✔️":"❌"), () => {
  106. GM_setValue('Community_check', !Community_check);
  107. location.reload();
  108. });
  109. var game_meta_data=document.querySelectorAll('div.game_meta_data');//steam game page
  110. if(game_meta_data.length>0){
  111. var category_block=document.querySelectorAll('div#category_block')[0];
  112. var div_item=create_div("Community_Items",false,game_meta_data[0],category_block);
  113.  
  114. appid=window.location.pathname.split('/')[2];
  115. var a_avatar=create_a("Avatar","https://steamcommunity.com/ogg/"+appid+"/Avatar/List","anchor_avatar")
  116. var a_market=create_a("Community Market","https://steamcommunity.com/market/search?appid=753&category_753_Game[]=tag_app_"+appid+"#p1_name_asc","anchor_Items")
  117. var a_points=create_a("Points Shop","https://store.steampowered.com/points/shop/app/"+appid,"anchor_Items")
  118. var a_steamcardexchange=create_a("steamcardexchange","https://www.steamcardexchange.net/index.php?gamepage-appid-"+appid,"anchor_Items")
  119. var a_steamdb=create_a("steamdb/communityitems","https://steamdb.info/app/"+appid+"/communityitems/","anchor_Items")
  120. div_item.appendChild(a_avatar);
  121. div_item.appendChild(a_market);
  122. div_item.appendChild(a_points);
  123. div_item.appendChild(a_steamcardexchange);
  124. div_item.appendChild(a_steamdb);
  125. div_item.style.backgroundImage="url('https://cdn.cloudflare.steamstatic.com/steam/apps/"+appid+"/page_bg_generated_v6b.jpg')";
  126.  
  127. if(Community_check){
  128. fn_XMLHttpRequest("https://steamcommunity.com/market/search?appid=753&category_753_Game[]=tag_app_"+appid+"#p1_name_asc",fn_re_market_check);
  129. fn_XMLHttpRequest("https://steamcommunity.com/ogg/"+appid+"/Avatar/List",fn_re_avatar_check);
  130. }
  131. }
  132. var market_search_results_header=document.querySelectorAll('div.market_search_results_header');//steam market page
  133. if(market_search_results_header.length>0){
  134. appid=url.searchParams.get('category_753_Game[]').replace(/tag_app_/i, '');
  135. console.log(appid);
  136. }
  137. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址