乾淨ㄉ原價屋

讓我好好的選零件…

  1. // ==UserScript==
  2. // @name 乾淨ㄉ原價屋
  3. // @namespace https://github.com/FlandreDaisuki
  4. // @description 讓我好好的選零件…
  5. // @version 2021.05.20
  6. // @author FlandreDaisuki
  7. // @match *://www.coolpc.com.tw/evaluate.php
  8. // @require https://unpkg.com/sentinel-js@0.0.5/dist/sentinel.js
  9. // @noframes
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. // 推薦搭配 AdGuard Annoyances 過濾清單
  14.  
  15. /* cSpell:ignore vwpro mesg Ttitle Fitem */
  16. /* global sentinel */
  17.  
  18. const $ = (s) => document.querySelector(s);
  19.  
  20. // 取消鎖右鍵
  21. document.body.removeAttribute('oncontextmenu');
  22. document.body.removeAttribute('onselectstart');
  23.  
  24. // 總金額預覽移到上面
  25. sentinel.on('#fDiv', (floatingBar) => {
  26. sentinel.off('#fDiv');
  27. floatingBar.remove();
  28. $('#know').insertAdjacentElement('afterend', floatingBar);
  29. });
  30.  
  31. // 保留輸出圖片功能
  32. sentinel.on('#vwpro', () => {
  33. $('#doc').classList.add('zTop');
  34. });
  35.  
  36. sentinel.on('button[onclick="Gauze(2)"]', (imageExportCancelBtnEl) => {
  37. sentinel.off('button[onclick="Gauze(2)"]');
  38. imageExportCancelBtnEl.addEventListener('click', () => {
  39. $('#doc').classList.remove('zTop');
  40. });
  41. });
  42.  
  43. // 刪除無用的 iframe
  44. const iframeSelectors = [
  45. 'iframe[src^="/home"]',
  46. 'iframe[src$="eval-mesg.php"]',
  47. ];
  48.  
  49. sentinel.on(String(iframeSelectors), (iframe) => {
  50. iframe.remove();
  51. });
  52.  
  53. // 調整樣式
  54. const styleEl = document.createElement('style');
  55. document.body.appendChild(styleEl);
  56. styleEl.textContent = `
  57. body {
  58. overflow: auto !important;
  59. }
  60. #Psu,
  61. #hid,
  62. #Ttitle > tbody > tr:nth-of-type(1) > td:nth-of-type(2),
  63. #Ttitle > tbody > tr:nth-of-type(2) {
  64. display: none !important;
  65. }
  66. #doc {
  67. z-index: -1 !important;
  68. }
  69. form[action="eva-excel.php"] {
  70. position: relative;
  71. }
  72. #Ttitle > tbody > tr:first-of-type > td:first-of-type {
  73. display: grid;
  74. grid-template-columns: repeat(2, auto);
  75. }
  76. #fDiv {
  77. position: relative;
  78. display: flex;
  79. transform: initial;
  80. left: inherit !important
  81. }
  82. #ftb {
  83. margin: 0;
  84. border: 2px solid black;
  85. }
  86. #Fitem {
  87. position: relative !important;
  88. }
  89. #doc.zTop {
  90. z-index: 20 !important;
  91. background: rgba(0, 0, 0, 0.8);
  92. }
  93. #MatchArea {
  94. position: absolute;
  95. top: 100%;
  96. }`;

QingJ © 2025

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