Google Minus One ავტორი Claire Rosenthal
Removes the 'Upgrade' advertisement on Google online products, including Docs, Mail, Drive, etc.
გაფართოების მონაცემები
გაფართოების შესახებ
Removes the 'Upgrade' advertisement on Google online products, including Docs, Mail, Drive, etc.
Around 25 lines of actual code. Nothing fancy. I'm going to post the code here in case you want to look at it:
Around 25 lines of actual code. Nothing fancy. I'm going to post the code here in case you want to look at it:
/**
* Project: Goole Minus One Firefox Extension
* File Purpose: This file is the main javascript file for the extension. It finds the
* upgrade advertisement on google pages and remove the html element.
* Responsible Party: Claire Rosenthal
* License: GNU GPLv3
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// This is a Stack Overflow solution to waiting for and finding an html element using the MutationObserver function.
// Source - https://stackoverflow.com/a/61511955
// Posted by Yong Wang, modified by community. See post 'Timeline' for change history
// Retrieved 2026-07-01, License - CC BY-SA 4.0
function waitForElm(selector) {
return new Promise((resolve) => {
if (document.querySelector(selector)) {
return resolve(document.querySelector(selector));
}
const observer = new MutationObserver((mutations) => {
if (document.querySelector(selector)) {
observer.disconnect();
resolve(document.querySelector(selector));
}
});
// If you get "parameter 1 is not of type 'Node'" error, see https://stackoverflow.com/a/77855838/492336
observer.observe(document.body, {
childList: true,
subtree: true,
});
});
}
// This is where the waiting for and selection of the html element starts.
// Here is where the different selection ids come from:
// .s1rbBe is the upgrade selector for Gmail
// .appsElementsWorkspaceRecommendationContentButtonFull is the upgrade button selector for Google Workspace (Docs, Sheets, etc.)
// .wKxlIc is the upgrade button selector for Google Calendar
// .Iu19ad-OkO9ve-yp5uJf-j is the upgrade button selector for Google Drive
waitForElm(
".s1rbBe,.appsElementsWorkspaceRecommendationContentButtonFull,.wKxlIc,.Iu19ad-OkO9ve-yp5uJf-j",
).then((elm) => {
elm.remove();
});
0 შეფასება 0 მიმომხილველისგან
ნებართვები და მონაცემები
მოთხოვნილი ნებართვები:
- თქვენს მონაცემებთან წვდომა google.com მისამართის საიტებზე
აღსარიცხი მონაცემები:
- შემქმნელის თქმით ეს გაფართოება არ საჭიროებს მონაცემთა აღრიცხვას.
დამატებითი მონაცემები
- დამატების ბმულები
- ვერსია
- 0.5
- ზომა
- 49,71 კბ
- ბოლო განახლება
- 5 დღის წინ (2 ივლ 2026)
- მსგავსი კატეგორიები
- ვერსიის ისტორია
- კრებულში დამატება