Skip to content

Instantly share code, notes, and snippets.

@kugland
Created July 7, 2020 23:03
Show Gist options
  • Save kugland/b7439a08f82f133b4867ef9ebf7e3cee to your computer and use it in GitHub Desktop.
Save kugland/b7439a08f82f133b4867ef9ebf7e3cee to your computer and use it in GitHub Desktop.
// ==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