NerdScript

Add a button to open an iframe's source in a new tab on nerd.wwnorton.com/nerd/

Pada tanggal 06 Desember 2025. Lihat %(latest_version_link).

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         NerdScript
// @namespace    https://nerd.wwnorton.com/nerd/
// @version      1.0
// @description  Add a button to open an iframe's source in a new tab on nerd.wwnorton.com/nerd/
// @author       Augusto Larson
// @match        https://nerd.wwnorton.com/nerd/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    function openIframeSourceInNewTab() {
        var iframe = document.querySelector('#iframe-content');
        var src = iframe.src;
        // console.log(src);
        window.open(src, '_blank');
    }

    var button = document.createElement('button');
    button.innerHTML = 'Open Source in New Tab';
    button.style.position = 'fixed';
    button.style.top = '100';
    button.style.right = '10px';
    button.style.zIndex = '9999';
    button.style.backgroundColor = 'white';
    button.style.borderRadius = '5px';
    button.style.color = 'white';

    button.addEventListener('click', openIframeSourceInNewTab);

    document.body.appendChild(button);
})();