Steam: add HowLongToBeat link

Adds a link to search for the game's playtime on HowLongToBeat

  1. // ==UserScript==
  2. // @name Steam: add HowLongToBeat link
  3. // @include http://store.steampowered.com/app/*
  4. // @include https://store.steampowered.com/app/*
  5. // @description Adds a link to search for the game's playtime on HowLongToBeat
  6. // @version 1.0.0
  7. // @author vonRaven
  8. // @namespace vonRaven
  9. // @license MIT License
  10. // @grant none
  11. // @run-at document-start
  12. // @require https://gf.qytechs.cn/scripts/12228/code/setMutationHandler.js
  13. // ==/UserScript==
  14.  
  15. setMutationHandler(document, '.apphub_AppName', function(nodes) {
  16. var yt = document.createElement('div');
  17. var link = 'https://howlongtobeat.com/?q=' + nodes[0].textContent.replace(' ','+') + '#search';
  18. nodes[0].parentNode.insertBefore(yt, nodes[0]);
  19. yt.outerHTML =
  20. '<div class="apphub_OtherSiteInfo" style="margin-right:1em">\
  21. <a class="btnv6_blue_hoverfade btn_medium" href="' + link + '">\
  22. <span>HowLongToBeat</span>\
  23. </a>\
  24. </div>';
  25. this.disconnect();
  26. });

QingJ © 2025

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