Skip to content

Instantly share code, notes, and snippets.

@jamesliu96
Last active May 30, 2024 03:27

Revisions

  1. jamesliu96 revised this gist May 30, 2024. 1 changed file with 13 additions and 11 deletions.
    24 changes: 13 additions & 11 deletions aiirl.user.js
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    // ==UserScript==
    // @name AIIRL
    // @version 1.0.0
    // @version 1.0.1
    // @description REAL LIFE AI
    // @author jamesliu96
    // @license MIT
    @@ -14,15 +14,17 @@
    // @connect ciciai.com
    // ==/UserScript==

    addEventListener('load', async () => {
    for (;;) {
    const el = Array.from(document.querySelectorAll('span')).find(x => x.className.includes('disclaimer-text') || x.textContent.includes('不能完全保障真实') || x.textContent.includes('Might not be accurate'));
    if (el) {
    const fn = () => {
    el.textContent = location.hostname === 'www.ciciai.com' ? 'Content generated by AI. Must not be accurate.' : '内容由豆包大模型生成,完全不能保障真实';
    };
    fn();
    addEventListener('load', () => {
    setInterval(() => {
    const el = Array.from(document.querySelectorAll('span')).find(
    (x) =>
    x.className.includes('disclaimer-text') ||
    (x.textContent.includes('不能完全') && x.textContent.match(/might/i))
    );
    if (el && el.textContent) {
    el.textContent = el.textContent
    .replace(/()()/, '$2$1')
    .replace(/might/i, 'Must');
    }
    await new Promise(r => setTimeout(r, 100));
    }
    }, 100);
    });
  2. jamesliu96 revised this gist May 29, 2024. No changes.
  3. jamesliu96 revised this gist May 29, 2024. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions aiirl.user.js
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,11 @@
    // ==UserScript==
    // @name AIIRL
    // @version 0.0.1
    // @version 1.0.0
    // @description REAL LIFE AI
    // @author jamesliu96
    // @license MIT
    // @namespace https://jamesliu.info/
    // @homepage https://gist.github.com/jamesliu96/fcdf86b41d9bd2e768e288cb7b36744f
    // @match https://www.doubao.com/*
    // @match https://www.ciciai.com/*
    // @icon https://lf-flow-web-cdn.doubao.com/obj/flow-doubao/doubao/web/logo-icon.png
    @@ -24,4 +25,4 @@ addEventListener('load', async () => {
    }
    await new Promise(r => setTimeout(r, 100));
    }
    });
    });
  4. jamesliu96 created this gist May 29, 2024.
    27 changes: 27 additions & 0 deletions aiirl.user.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    // ==UserScript==
    // @name AIIRL
    // @version 0.0.1
    // @description REAL LIFE AI
    // @author jamesliu96
    // @license MIT
    // @namespace https://jamesliu.info/
    // @match https://www.doubao.com/*
    // @match https://www.ciciai.com/*
    // @icon https://lf-flow-web-cdn.doubao.com/obj/flow-doubao/doubao/web/logo-icon.png
    // @icon https://sf-flow-web-cdn.ciciaicdn.com/obj/ocean-flow-web-sg/cici_web/logo-icon-cici.png
    // @connect doubao.com
    // @connect ciciai.com
    // ==/UserScript==

    addEventListener('load', async () => {
    for (;;) {
    const el = Array.from(document.querySelectorAll('span')).find(x => x.className.includes('disclaimer-text') || x.textContent.includes('不能完全保障真实') || x.textContent.includes('Might not be accurate'));
    if (el) {
    const fn = () => {
    el.textContent = location.hostname === 'www.ciciai.com' ? 'Content generated by AI. Must not be accurate.' : '内容由豆包大模型生成,完全不能保障真实';
    };
    fn();
    }
    await new Promise(r => setTimeout(r, 100));
    }
    });