steamcommunity-enable-html-rendering

让Steam创意工坊正常渲染更新日志中的HTML代码。

  1. // ==UserScript==
  2. // @name steamcommunity-enable-html-rendering
  3. // @name:en steamcommunity-enable-html-rendering
  4. // @namespace http://tampermonkey.net/
  5. // @version 0.2
  6. // @description 让Steam创意工坊正常渲染更新日志中的HTML代码。
  7. // @description:en Let the Steam Workshop render the HTML code in the update log normally.
  8. // @author 青青草原专业抓羊
  9. // @match https://steamcommunity.com/sharedfiles/filedetails/changelog/*
  10. // @icon https://www.google.com/s2/favicons?sz=64&domain=steamcommunity.com
  11. // @homepage https://gf.qytechs.cn/zh-CN/scripts/478772-steamcommunity-enable-html-rendering
  12. // @license MIT
  13. // @grant none
  14. // ==/UserScript==
  15.  
  16. (function() {
  17. 'use strict';
  18.  
  19. function htmlDecode(input) {
  20. var ret = input.replace(/>/g, '>');
  21. ret = ret.replace(/&lt;/g, '<');
  22. ret = ret.replace(/&quot;/g, '"');
  23. ret = ret.replace(/&apos;/g, "'");
  24. ret = ret.replace(/&amp;/g, '&');
  25. return ret;
  26. }
  27.  
  28. var logList = document.querySelectorAll("#profileBlock > div > p");
  29. logList.forEach(element => {
  30. element.innerHTML = htmlDecode(element.innerHTML);
  31. });
  32. })();

QingJ © 2025

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