you are viewing a single comment's thread
view the rest of the comments
[–] 54 points 3 days ago (5 children)

I want a browser add-on to addend (Airport!) to any instance of plane.

  • source
  • hideshow 5 child comments
  • [–] 20 points 3 days ago* (1 child)

    Ask and you shall receive

    // ==UserScript==
    // @name         Airport!
    // @namespace    Airporty
    // @version      2026-09-24
    // @description  (Airport!)
    // @match        https://*/*
    // @grant        none
    // ==/UserScript==
    
    (() => {
        'use strict';
        const search = /plane/gi;
        const replaceWith = 'plane (Airport!)';
        const excludedTagNames = ['SCRIPT', 'STYLE', 'INPUT', 'TEXTAREA'];
    
        // walk through document's nodes collecting elements with text inside
        // (but filter out tags that should probably be skipped)
        const walker = document.createTreeWalker(
            document.body,
            NodeFilter.SHOW_TEXT,
            {
                acceptNode: node =>
                excludedTagNames.includes(node.parentElement?.tagName)
                ? NodeFilter.FILTER_REJECT
                : NodeFilter.FILTER_ACCEPT
            }
        );
    
        // loop through the planes, making (Airport!)s :)
        for (let node = walker.nextNode(); node; node = walker.nextNode()) {
            node.nodeValue = node.nodeValue.replace(search, replaceWith);
        }
    })();
    
  • source
  • parent
  • hideshow 1 child comment
  • [–] 22 points 3 days ago

    Pilot killed in Grant County, WA small plane (Airport!) crash

    The Brief

    • A small plane (Airport!) crashed into a field near Road 11-SW and Adams Road South in Grant County on Thursday evening.

    • Authorities confirmed that the pilot, who was the sole occupant, was killed in the crash.

    • Officials stated there was no fire or risk to the public as an investigation into the cause remains underway.

    GRANT COUNTY, Wash. - An investigation is underway after a small plane (Airport!) crashed, killing the pilot in Grant County on Thursday evening...

  • source
  • parent