-
Notifications
You must be signed in to change notification settings - Fork 0
/
DoubanX.user.js
37 lines (31 loc) · 1011 Bytes
/
DoubanX.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
34
35
36
// ==UserScript==
// @name DoubanX
// @description Download Douban Movies
// @author wenLiangcan
// @version 0.1
// @namespace https://github.com/wenLiangcan
// @homepage https://github.com/wenLiangcan/Userscripts
// @license GPL version 3 (http://www.gnu.org/licenses/gpl.txt)
// @copyright Copyright © 2015 wenLiangcan
// @updateURL
// @downloadURL
// @include http://movie.douban.com/subject/*
// @include https://movie.douban.com/subject/*
// @run-at document-end
// @grant none
// ==/UserScript==
//
(function() {
var div = document.createElement('div');
var span = document.createElement('span');
span.className = 'pl';
span.textContent = 'DoubanX: ';
var a = document.createElement('a');
a.href = document.URL.replace('douban', 'doubanx');
a.target = '_blank';
a.text = 'X';
div.appendChild(span);
div.appendChild(a);
var info = document.getElementById('info');
info.appendChild(div);
})();