您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Ajusta automaticamente a largura do GitHub para melhorar a visualização.
当前为
// ==UserScript== // @name GitHub Reader New // @namespace Violentmonkey Scripts // @match https://*.github.com/* // @grant none // @version 1.3 // @author EmersonxD // @description Ajusta automaticamente a largura do GitHub para melhorar a visualização. // @license MIT // ==/UserScript== (function() { 'use strict'; // Verifica se o estilo já existe antes de criar um novo if (!document.querySelector('#github-reader-enhancer-style')) { var style = document.createElement('style'); style.id = 'github-reader-enhancer-style'; document.head.appendChild(style); } // Define variáveis para valores repetidos var maxWidth = '100%'; var containerMaxWidth = '90%'; // Aplica o CSS personalizado document.querySelector('#github-reader-enhancer-style').innerHTML = ` .timeline-new-comment, .markdown-body { max-width: ${maxWidth}; } .markdown-body { font-size: 1.4em; } .discussion-timeline, .container-lg, .container-xl { max-width: ${containerMaxWidth}; } `; // Função para enviar e-mails function sendEmail(subject, body, recipient) { var link = `mailto:${recipient}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`; window.location.href = link; } // Evento de clique no botão de salvar e enviar e-mails var saveAndSendBtn = document.createElement('button'); saveAndSendBtn.textContent = 'Salvar e Enviar E-mail'; saveAndSendBtn.style.position = 'fixed'; saveAndSendBtn.style.bottom = '20px'; saveAndSendBtn.style.right = '20px'; saveAndSendBtn.style.zIndex = '9999'; saveAndSendBtn.addEventListener('click', function() { var subject = 'Texto salvo do GitHub Reader New'; var body = document.body.innerText; var recipient = '[email protected]'; sendEmail(subject, body, recipient); }); document.body.appendChild(saveAndSendBtn); })();