Envia fácilmente a Menéame.
当前为
// ==UserScript==
// @name +ENVIAR - Menéame
// @namespace http://tampermonkey.net/
// @version 2025-01-05.5
// @description Envia fácilmente a Menéame.
// @author Ergomnm
// @match ://*/*
// @exclude /^[^:/#?]*:\/\/([^#?/]*\.)?www\.meneame\.net(:[0-9]{1,5})?\/.*$/
// @icon https://www.google.com/s2/favicons?sz=64&domain=meneame.net
// @grant none
// @license GNU GPLv3
// ==/UserScript==
(function() {
'use strict';
// Crear el botón
let button = document.createElement('button');
button.innerText = 'ENVIAR';
button.style.position ='relative';
button.style.lineHeight= '16px';
button.style.left = '70px';
button.style.top = '-5px';
button.style.height = '18px';
button.style.transform = 'translateX(-50%)';
button.style.zIndex = '9999';
button.style.padding = '0px 7px 0px 15px';
button.style.backgroundColor = '#e35614';
button.style.color = '#ffffff';
button.style.border = 'none';
button.style.borderRadius = '10px';
button.style.cursor = 'pointer';
button.style.fontSize = '11px';
button.style.fontFamily = 'Open Sans';
button.style.fontWeight = 'bold';
button.style.boxShadow = '0px 2px 3px rgba(0, 0, 0, 0.1)';
// Añadir una clase al botón
button.classList.add('enviarmnm');
// Agregar el botón al cuerpo de la página
//let targetElement = document.querySelector("h1[class*=title],h2[class*=title],h1[class*=head],h2[class*=head]");
// Si se encontró un elemento, añade el botón
//if (targetElement) {
// targetElement.appendChild(button);
//}
//else {
document.querySelector("h1[class*=title],h2[class*=title],h2[class*=head],h1[class*=head],h1").appendChild(button);
//}
// Función para abrir la URL de envío a Menéame
button.addEventListener('click', function() {
let currentUrl = encodeURIComponent(window.location.href.split('?')[0]);
let currentTitle = encodeURIComponent(document.title);
let meneameUrl = `https://www.meneame.net/submit?url=${currentUrl}&title=${currentTitle}`;
window.open(meneameUrl, '_blank');
});
})();