Skip to content

Instantly share code, notes, and snippets.

@malys
Last active January 16, 2026 16:50
Show Gist options
  • Select an option

  • Save malys/6be69001b3c5df0d9e5d47cfacb783fa to your computer and use it in GitHub Desktop.

Select an option

Save malys/6be69001b3c5df0d9e5d47cfacb783fa to your computer and use it in GitHub Desktop.
[Open all links gmail] #gmail #userscript
// ==UserScript==
// @name Gmail all links
// @namespace Violentmonkey Scripts
// @version 3.0
// @description Ajouter un button pour ouvrir tous les lients
// @author Vous
// @match https://mail.google.com/mail/u/*
// @grant GM_xmlhttpRequest
// @grant GM_openInTab
// @grant GM_addStyle
// @run-at document-end
// @downloadURL https://gist.githubusercontent.com/malys/6be69001b3c5df0d9e5d47cfacb783fa/raw/userscript.js
// @updateURL https://gist.githubusercontent.com/malys/6be69001b3c5df0d9e5d47cfacb783fa/raw/userscript.js
// ==/UserScript==
//
'use strict';
function openLinks(){
for (let el of document.querySelectorAll('div[role="listitem"] a')) {
let href = el.getAttribute('href');
console.log(href)
GM_openInTab(href, true);
}
}
(function () {
const post = document.createElement('button');
post.textContent = '✔️';
post.style.position = 'fixed';
post.style.top = '2px';
post.style.left = '170px';
post.style.zIndex = '9999';
post.style.padding = '5px 5px';
post.style.fontSize = '20px';
post.style.backgroundColor = '#0073ea';
post.style.color = 'white';
post.style.border = 'none';
post.style.borderRadius = '20px';
post.style.cursor = 'pointer';
document.body.appendChild(post);
post.addEventListener('click', openLinks);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment