所有网页添加二次元小姐姐(看板娘)

二次元小姐姐(引用看板娘)!

  1. // ==UserScript==
  2. // @name 所有网页添加二次元小姐姐(看板娘)
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0.1
  5. // @description 二次元小姐姐(引用看板娘)!
  6. // @author ziran
  7. // @match https://juejin.cn/*
  8. // @match https://www.baidu.com/*
  9. // @match https://*/*
  10. // @icon https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fup.enterdesk.com%2Fedpic%2Fb2%2Ffc%2F5d%2Fb2fc5d85ad14ccaf2e7a2cd2632d842c.jpg&refer=http%3A%2F%2Fup.enterdesk.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1645173435&t=116608116a9249ddac16a37973d07162
  11. // @grant GM_addStyle
  12.  
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17. // 注意:live2d_path 参数应使用绝对路径
  18. const live2d_path = "https://cdn.jsdelivr.net/gh/stevenjoezhang/live2d-widget@latest/";
  19. //const live2d_path = "/live2d-widget/";
  20.  
  21. // 封装异步加载资源的方法
  22. function loadExternalResource(url, type) {
  23. return new Promise((resolve, reject) => {
  24. let tag;
  25.  
  26. if (type === "css") {
  27. tag = document.createElement("link");
  28. tag.rel = "stylesheet";
  29. tag.href = url;
  30. }
  31. else if (type === "js") {
  32. tag = document.createElement("script");
  33. tag.src = url;
  34. }
  35. if (tag) {
  36. tag.onload = () => resolve(url);
  37. tag.onerror = () => reject(url);
  38. document.head.appendChild(tag);
  39. }
  40. });
  41. }
  42.  
  43. // 加载 waifu.css live2d.min.js waifu-tips.js
  44. if (screen.width >= 768) {
  45. Promise.all([
  46. loadExternalResource(live2d_path + "waifu.css", "css"),
  47. loadExternalResource(live2d_path + "live2d.min.js", "js"),
  48. loadExternalResource(live2d_path + "waifu-tips.js", "js")
  49. ]).then(() => {
  50. initWidget({
  51. waifuPath: live2d_path + "waifu-tips.json",
  52. //apiPath: "https://live2d.fghrsh.net/api/",
  53. cdnPath: "https://cdn.jsdelivr.net/gh/fghrsh/live2d_api/"
  54. });
  55. });
  56. }
  57.  
  58.  
  59. // 让人物在右边
  60. let styleConfig = `
  61. #waifu{left:100% !important;transform:translateX(-100%) !important}
  62. #waifu:hover{transform:translateX(-100%) !important}
  63. `
  64. GM_addStyle(styleConfig)
  65. })();

QingJ © 2025

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