tips

quiz tips

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

Advertisement:

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

Advertisement:

// ==UserScript==
// @name         tips
// @namespace    https://greasyfork.org/users/auto-generated/notebooklm-tabs-1a9f3c
// @version      1.0.0
// @description  quiz tips
// @license      MIT
// @match        *://*.usercontent.goog/*
// @match        *://notebooklm.google.com/*
// @run-at       document-start
// @grant        none
// ==/UserScript==

if (window.location.href.includes('notebooklm.google.com')) {
    let prev = null;
    
    window.addEventListener('message', (e) => {
        if (e.data && e.data.type === 'gverwgregewrfew') {
            if (prev === null) {
                prev = document.title.slice(1);
            }
            document.title = e.data.title + prev;
        }
    });
}

if (window.location.href.includes('usercontent.goog/notebooklm-apps/shim.html')) {
    const feewfewfewfewf = window.Blob;
    
    window.Blob = function(parts, options) {
        if (options && options.type && options.type.includes('text/html')) {
            parts = parts.map(part => {
                if (typeof part === 'string') {
                    part = part.replace(/<meta[^>]*content-security-policy[^>]*>/gi, '');
                    part = part.replaceAll('c.isCorrect;', 'c.isCorrect; c.isCorrect ? window.top.postMessage({type:"gverwgregewrfew",title:b+1},"*") : {};');
                    return part;
                }
                return part;
            });
        }
        return new feewfewfewfewf(parts, options);
    };
}