-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdouban.user.js
63 lines (61 loc) · 4.11 KB
/
douban.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// ==UserScript==
// @name 在豆瓣搜索直达
// @icon https://img3.doubanio.com/favicon.ico
// @namespace https://syys.ml/
// @version 0.0.6
// @description:zh-CN 在豆瓣电影页面标题处显示搜索页的直达按钮
// @author D.Young
// @match *://movie.douban.com/subject/*
// @description D.Young
// ==/UserScript==
(function () {
var host = location.hostname;
if (host === 'movie.douban.com') {
const title = document.querySelector('title').innerText.replace(/(^\s*)|(\s*$)/g, '').replace(' (豆瓣)', '');
const subjectwrap = document.querySelector('h1');
const subject = document.querySelector('.year');
if (!subjectwrap || !subject) {
return;
}
const sectl = document.createElement('span');
subjectwrap.insertBefore(sectl, subject.nextSibling);
sectl.insertAdjacentHTML('beforebegin',
`<style>.youkux{vertical-align: middle;}.youkux:hover{background: #fff!important;}</style>
<a href="https://youkux.ml/vodsearch/-------------.html?wd=${title}" class="youkux" target="_blank">
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 105.8 24" style="enable-background:new 0 0 105.8 24;" height="24" xml:space="preserve">
<style type="text/css">
.st0{fill:#273149;}
.st1{fill:#F24866;}
</style>
<path class="st0" d="M14.5,1.3c5.9,0,10.7,4.8,10.7,10.7s-4.8,10.7-10.7,10.7S3.8,17.9,3.8,12S8.6,1.3,14.5,1.3z M14.5,3.5
c-4.7,0-8.5,3.8-8.5,8.5s3.8,8.5,8.5,8.5S23,16.7,23,12S19.2,3.5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