【1.19更新】免订阅免登陆直接查询 OED(online)的便捷方式

谢谢!用上了,救大命

现在在GD上用需要怎么设置呢?已把顶楼链接里的{w}替换成%GDWORD%,现在不起作用了:

在GD上配置OED的在线词典,点击OED登录按钮没作用,不知道还有没有免登录直接查询的配置链接了

(帖子已被作者删除)

谢谢,顺便求一下Oxford Dictionaries 也就是ODE网站登录的脚本

I apologize I accidentally deleted my very first post in this forum and apparently there is a limit for daily edits, I am a rookie member. :slight_smile: In fact I made this account to answer your question. I wrote the scripts awhile ago for myself but I thought they might be helpful to others as well.

This script for the OED website (the one I accidentally deleted)

(function() {
    // 1. STATUS DETECTION
    const isLoggedIn = document.getElementById('signedInAs');
    const isLoginPage = document.querySelector('form[name="doneForm"]');

    // 2. REDIRECT LOGIC
    if (!isLoggedIn && !isLoginPage) {
        setTimeout(() => {
            window.location.replace("https://www.oed.com/login?provider=institutionalnoshib&login_state=librarycard&prompt=login&view_name=fullscreen&ref=http://www.oed.com/%3Ftl%3Dtrue");
        }, 300); 
        return;
    }

    // 3. LOGIN BANNER LOGIC
    if (isLoginPage) {
        const banner = document.createElement('div');
        const labelStyle = 'style="text-transform: uppercase; font-size: 0.8em; opacity: 0.9;"';
        
        banner.innerHTML = `📌 <span ${labelStyle}>Library:</span> YOUR LIBRARY | <span ${labelStyle}>Card Number:</span> YOUR PASS`;
        
        banner.style = "position:fixed; top:0; left:0; width:100%; z-index:999999; padding:12px; background:#222; color:white; text-align:center; font-weight:bold; border-bottom:3px solid red; font-family:sans-serif;";
        
        document.body.prepend(banner);
        document.body.style.paddingTop = "50px";
    }
})();

This one for the Oxford Dictionaries Premium website. Oxford Premium login page can be a bit clunky but the scripts are pretty much the same. If you log in with either one of these scripts, the other script will consider you are already logged in and will direct you to the main page, so you dont have to fill the forms twice. This one also has a cookie popup preventing code in it as a bonus :slight_smile:

(function() {
    // 1. PAGE DETECTION
    const loginLink = document.querySelector('a[href="https://premium.oxforddictionaries.com/account/login"]');
    const isLoginPage = document.querySelector('form[name="doneForm"]');

    // 2. REDIRECT LOGIC (With a 100ms delay to prevent the white screen)
    if (loginLink) {
        setTimeout(() => {
            window.location.replace("https://premium.oxforddictionaries.com/account/loginSigma?provider=institutionalnoshib&login_state=librarycard&prompt=login&view_name=fullscreen");
        }, 100); 
        return;
    }

    // 3. LOGIN BANNER LOGIC
    if (isLoginPage) {
        const banner = document.createElement('div');
        // Labels are now uppercase AND 20% smaller
        const labelStyle = 'style="text-transform: uppercase; font-size: 0.8em; opacity: 0.9;"';
        
        banner.innerHTML = `📌 <span ${labelStyle}>Library:</span> YOUR LIBRARY | <span ${labelStyle}>Card Number:</span> YOUR PASS`;
        
        banner.style = "position:fixed; top:0; left:0; width:100%; z-index:999999; padding:12px; background:#222; color:white; text-align:center; font-weight:bold; border-bottom:3px solid red; font-family:sans-serif;";
        
        document.body.prepend(banner);
        document.body.style.paddingTop = "50px";
    }
    
    // 4. REJECT ALL COOKIES (OneTrust logic)
    const handleOneTrust = () => {
        if (window.OneTrust && typeof window.OneTrust.RejectAll === 'function') {
            window.OneTrust.RejectAll();
            console.log("OneTrust: Cookies Rejected.");
        } else {
            // If OneTrust isn't loaded yet, try again in 100ms
            setTimeout(handleOneTrust, 100);
        }
    };
    handleOneTrust();
    
})();

As I said this is my very first post so if it was helpful to you, can you please give it a like :slight_smile: have fun.

Thank you for your kind detailed reply!!