-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathisgd.user.js
33 lines (31 loc) · 1.21 KB
/
isgd.user.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
// ==UserScript==
// @name is.gd/v.gd auto pronouncable
// @namespace https://github.com/Alistair1231/my-userscripts/
// @version 4.0
// @description auto selects 'lowercase pronouncable'
// @author Alistair1231
// @match https://is.gd/
// @match https://is.gd/create.php
// @match https://is.gd/index.php
// @match https://v.gd/
// @match https://v.gd/create.php
// @match https://v.gd/index.php
// @license MIT
// @copyright 2020, Alistair1231 (https://openuserjs.org/users/Alistair1231)
// ==/UserScript==
(function() {
'use strict';
// click more options (technically not necessary)
document.getElementById("shorturllabel").children[0].click();
// select lower-case pronouncable
document.getElementById("options").children[4].checked=true;
var page = window.location.pathname.split('/')[1];
// if on create.php highlight shorted url
if(page === "create.php"){
document.getElementById("short_url").select();
}
// If on main page highlight long url input
else if(page == "index.php" || page === ""){
document.getElementById("urlboxcontainer").children[0].select();
}
})();