Last active
June 18, 2024 06:07
-
-
Save jdayllon/cd0c14b520cfa49695e2eba18a1c3bd3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Abrir enlaces externos en nueva pestaña | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Abre enlaces externos en una nueva pestaña | |
// @author Microsoft Copilot | |
// @match https://hgp.sandetel.es/issues/* | |
// @match https://redmine-attgap.juntadeandalucia.es/issues/* | |
// @grant none | |
// @uploadURL https://gist.github.com/jdayllon/cd0c14b520cfa49695e2eba18a1c3bd3/raw/hgp-add-blank.js | |
// @downloadURL https://gist.github.com/jdayllon/cd0c14b520cfa49695e2eba18a1c3bd3/raw/hgp-add-blank.js | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// Obtiene todos los enlaces de la página | |
var enlaces = document.getElementsByTagName('a'); | |
for (var i = 0; i < enlaces.length; i++) { | |
var enlace = enlaces[i]; | |
// Comprueba si el enlace es externo | |
if (enlace.hostname !== window.location.hostname) { | |
// Si es externo, abre en una nueva pestaña | |
enlace.target = '_blank'; | |
} | |
} | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Tacha lineas con TD | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-05-16 | |
// @description try to take over the world! | |
// @author You | |
// @match https://hgp.sandetel.es/projects/sds-hgp-01911-6/issues?query_id=* | |
// @match https://hgp.sandetel.es/projects/sds-hgp-01911-6/issues?per_page=*&query_id=11986 | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=sandetel.es | |
// @uploadURL https://gist.githubusercontent.com/jdayllon/cd0c14b520cfa49695e2eba18a1c3bd3/raw/hgp-tacha-fin-tampermoney.js | |
// @downloadURL https://gist.githubusercontent.com/jdayllon/cd0c14b520cfa49695e2eba18a1c3bd3/raw/hgp-tacha-fin-tampermoney.js | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// Función para tachar el texto de una fila | |
function tacharTexto(fila) { | |
var celdas = fila.getElementsByTagName('td'); | |
for (var i = 0; i < celdas.length; i++) { | |
celdas[i].style.textDecoration = 'line-through'; | |
} | |
} | |
// Buscar todas las filas de la tabla | |
var filas = document.getElementsByTagName('tr'); | |
// Recorrer todas las filas | |
for (var i = 0; i < filas.length; i++) { | |
var fila = filas[i]; | |
var celdas = fila.getElementsByTagName('td'); | |
// Recorrer todas las celdas de la fila | |
for (var j = 0; j < celdas.length; j++) { | |
var celda = celdas[j]; | |
// Si la celda tiene la clase 'status' y su texto es 'Final', tachar el texto de la fila | |
if (celda.className === 'status' && celda.textContent.trim() === 'Final') { | |
tacharTexto(fila); | |
break; | |
} | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment