Search in Douban

Searches the douban page from themoviedb, better using Chinese language

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        Search in Douban
// @namespace   https://greasyfork.org/users/50045
// @include     https://www.themoviedb.org/*
// @include     http://www.themoviedb.org/*
// @description Searches the douban page from themoviedb, better using Chinese language
// @version     1
// @grant       none
// ==/UserScript==

var x = document.getElementsByClassName('title') [0];

var htm = x.innerHTML;

var myRegexp = /<a.*?>(.*?)</m;
var m = myRegexp.exec(htm);
var movie = m[1];
console.log(movie);
x.appendChild(document.createElement('BR'));
x.appendChild(document.createElement('BR'));
var s;
s = document.createElement('A');
s.target = '_blank';
s.text = 'Search in 豆瓣';
s.href = 'https://movie.douban.com/subject_search?search_text=' + movie;
x.appendChild(s);