Skip to content

Instantly share code, notes, and snippets.

@avoidik
Created September 23, 2024 13:54
Show Gist options
  • Save avoidik/9fb43acb6a5c7be556adc8c8f48cac7f to your computer and use it in GitHub Desktop.
Save avoidik/9fb43acb6a5c7be556adc8c8f48cac7f to your computer and use it in GitHub Desktop.

Revisions

  1. avoidik created this gist Sep 23, 2024.
    28 changes: 28 additions & 0 deletions script.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    // ==UserScript==
    // @name Tame AmazonQ
    // @namespace http://tampermonkey.net/
    // @version 2024-09-23
    // @description Tampermonkey script to suppress Amazon Q annoyances
    // @author Anonymous
    // @match https://docs.aws.amazon.com/*
    // @match https://aws.amazon.com/*
    // @grant none
    // ==/UserScript==

    (function () {
    "use strict";

    let observer = new MutationObserver((mutationRecords) => {
    const popOver = document.querySelector(".floatingChatWindow-0-1-7.awsui-visual-refresh");
    if (popOver) popOver.remove();
    const emblemIcon = document.querySelector(".floatingChatContainer-0-1-1");
    if (emblemIcon) emblemIcon.remove();
    const popOverTour = document.querySelector("#floating-experience-feature-tour-popover");
    if (popOverTour) popOverTour.remove();
    const chatAssistent = document.querySelector('#mrc-sunrise-chat');
    if (chatAssistent) chatAssistent.remove();
    });

    observer.observe(document, { childList: true, subtree: true });

    })();