-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgoear_hotlink.user.js
More file actions
41 lines (38 loc) · 1.23 KB
/
goear_hotlink.user.js
File metadata and controls
41 lines (38 loc) · 1.23 KB
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
// ==UserScript==
// @name GoEar HotLink 2015
// @author laurenceHR
// @include *goear.com/listen/*
// @include *goear.com/listen/*/*
// @version 1.5
// @description Goear HotLink for download
// ==/UserScript==
// Script by laurenceHR - www.daxes.net
////// Get Song ID
var url = document.URL;
var urls = url.split('/');
var id = urls[4];
/////// Get HotLink
var hotlink = "http://www.goear.com/action/sound/get/" + id;
////// Add HotLink
addHotLink(hotlink);
//////
/****** Function For Add Link *****/
function addHotLink(link){
//var style = document.createElement('style');
//var css = "#main.listen .actions .down {background-position-y: 8px;}" + "\n";
// style.textContent= css;
//var head = document.getElementsByTagName('head')[0];
// head.appendChild(style);
var a = document.createElement('a');
a.href = link;
a.target = "_blank";
a.innerHTML = '<span class="glyphicons download"></span>';
a.title = 'Get HotLink';
a.className = '';
a.id = 'hotlink';
var li = document.createElement('li');
li.className = 'action_item';
li.appendChild(a);
var ul_actions = document.getElementsByClassName('actions')[0];
ul_actions.appendChild(li);
}