about_and_feedback_components

个人项目自用关于和问题反馈组件

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/521941/1510304/about_and_feedback_components.js

  1. // ==UserScript==
  2. // @name about_and_feedback_components
  3. // @namespace http://tampermonkey.net/
  4. // @license Apache-2.0
  5. // @version 0.2
  6. // @author byhgz
  7. // @description 个人项目自用关于和问题反馈组件
  8. // @noframes
  9. // ==/UserScript==
  10. "use strict";
  11. /**
  12. *往页面插入关于和反馈组件
  13. * 传参works用于排除作品集和更新反馈地址,如当前是aaa,作品集里有aaa,则aaa不会显示在作品集里
  14. * @param cssSelector {string} css选择器
  15. * @param works {{}} 当前作品
  16. * @param works.title {string} 标题
  17. * @param works.gfurl {string} 链接
  18. * @param works.gfFeedbackUrl {string} 当前脚本gf反馈链接,如未给则使用作者的地址
  19. * @param works.desc {string} 描述
  20. *
  21. */
  22. const installAboutAndFeedbackComponentsVue = (cssSelector, works) => {
  23. return new Vue({
  24. el: cssSelector,
  25. template: `
  26. <div>
  27. <div v-for="item in feedbacks" :key="item.title">
  28. {{ item.title }}
  29. <button gz_type><a :href="item.href" target="_blank">{{ item.href }}</a></button>
  30. </div>
  31. <hr>
  32. <div>
  33. <h1>作者其他脚本</h1>
  34. <div v-for="item in otherScriptSets" :key="item.title" :title="item.desc">
  35. {{ item.title }}
  36. <button gz_type><a :href="item.url" target="_blank">{{ item.url }}</a></button>
  37. <span>{{ item.desc }}</span>
  38. </div>
  39. </div>
  40. </div>
  41. `,
  42. data() {
  43. return {
  44. feedbacks: [
  45. {
  46. title: "gf反馈",
  47. href: "https://gf.qytechs.cn/zh-CN/users/1037952-hgztask",
  48. },
  49. {
  50. title: "q群反馈",
  51. href: "http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=tFU0xLt1uO5u5CXI2ktQRLh_XGAHBl7C&authKey=KAf4rICQYjfYUi66WelJAGhYtbJLILVWumOm%2BO9nM5fNaaVuF9Iiw3dJoPsVRUak&noverify=0&group_code=876295632",
  52. },
  53. {
  54. title: "作者B站",
  55. href: "https://space.bilibili.com/473239155",
  56. },
  57. {
  58. title: "作者github",
  59. href: "https://github.com/hgztask",
  60. },
  61. {
  62. title: '作者gitee',
  63. href: "https://gitee.com/hangexi",
  64. }
  65. ],
  66. otherScriptSets: [
  67. {
  68. title: "B站屏蔽增强器",
  69. url: "https://gf.qytechs.cn/zh-CN/scripts/461382",
  70. desc: "支持动态屏蔽、评论区过滤屏蔽,视频屏蔽(标题、用户、uid等)、蔽根据用户名、uid、视频关键词、言论关键词和视频时长进行屏蔽和精简处理,支持获取b站相关数据并导出为json(用户收藏夹导出,历史记录导出、关注列表导出、粉丝列表导出)(详情看脚本主页描述)"
  71. },
  72. {
  73. title: "去除b站首页右下角推广广告",
  74. url: "https://gf.qytechs.cn/zh-CN/scripts/516566",
  75. desc: "移除b站首页右下角按钮广告和对应的横幅广告"
  76. },
  77. {
  78. title: "b站首页视频列数调整",
  79. url: "https://gf.qytechs.cn/zh-CN/scripts/512973",
  80. desc: "修改b站首页视频列表的列数,并移除大图"
  81. },
  82. {
  83. title: "github链接新标签打开",
  84. url: "https://gf.qytechs.cn/zh-CN/scripts/489538",
  85. desc: "github站内所有的链接都从新的标签页打开,而不从当前页面打开"
  86. }
  87. ]
  88. }
  89. },
  90. created() {
  91. const findOtherScriptIndex = this.otherScriptSets.findIndex(item => item.title === works.title);
  92. if (findOtherScriptIndex !== -1) {
  93. //找到当前作品时移除作品集
  94. this.otherScriptSets.splice(findOtherScriptIndex, 1);
  95. }
  96. const findFeedback = this.feedbacks.find(item => item.title === works.title);
  97. if (findFeedback) {
  98. //找到当前作品时修改反馈链接,未找到时则默认使用作者的反馈链接
  99. findFeedback.href = works.gfFeedbackUrl;
  100. }
  101.  
  102. }
  103. });
  104. };

QingJ © 2025

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