-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhostgator-panel.userscript.js
44 lines (33 loc) · 1.18 KB
/
hostgator-panel.userscript.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// ==UserScript==
// @name HostGator
// @namespace https://www.charles.art.br/userscripts/hostgator-panel
// @version 0.1
// @description Adiciona funcionalidades ao painel do HostGator
// @author Charles Cavalcante
// @match https://financeiro.hostgator.com.br/index.php?m=ssl_addon&action=request&type_ssl=free_ssl
// @require http://code.jquery.com/jquery-latest.js
// @grant none
// ==/UserScript==
(function() {
if(location=='https://financeiro.hostgator.com.br/index.php?m=ssl_addon&action=request&type_ssl=free_ssl') {
console.log('Certificado SSL');
setTimeout(function() {
console.log('Ordenação dos Domínios');
var domains = [];
$('#primary_domain option').each(function(i, item) {
if (i > 0) {
domains.push({ text: $(item).text(), value: $(item).val() });
}
});
domains.sort(function(a,b) {
return a.text < b.text ? -1 : a.text > b.text ? 1 : 0;
});
$('#primary_domain option').each(function(i, item) {
if (i > 0) {
$(item).val(domains[i + 1].value);
$(item).text(domains[i + 1].text);
}
});
}, 3000);
}
})();