Created
July 7, 2020 23:03
-
-
Save kugland/b7439a08f82f133b4867ef9ebf7e3cee to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Dicionário Analógico Aulete (correções) | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Corrige alguns problemas na página do dicionário analógico Aulete. | |
// @author You | |
// @match http://*.aulete.com.br/analogico/* | |
// @match https://*.aulete.com.br/analogico/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
if (window.location.protocol === 'https:') { | |
window.location.protocol = 'http:'; | |
} else { | |
document.querySelector('#analogico').style.height = 'auto'; | |
document.querySelector('.conceito a').innerText = document.title = decodeURIComponent(window.location.pathname.split(/\//g)[window.location.pathname.split(/\//g).length - 1]); | |
document.querySelector('.conceito a').href = '//www.aulete.com.br/' + decodeURIComponent(window.location.pathname.split(/\//g)[window.location.pathname.split(/\//g).length - 1]); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment