Douban_simple_version

A simple version for Douban website. Now the work is focused on movie subject.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @description A simple version for Douban website. Now the work is focused on movie subject. 
// @name Douban_simple_version
// @run-at document-start
// @match https://movie.douban.com/subject/*
// @version 0.0.1.20170816183917
// @namespace https://greatest.deepsurf.us/users/147405
// ==/UserScript==

// A script to simplify movie page on douban.com

// Locate Score Section
var score = document.getElementById("interest_sectl")
var button_score = document.createElement("input")

// Hide Score Section
score.style.visibility = "hidden"

// Create Button for Score Section
button_score.type = "button"
button_score.value = "展开评分"
button_score.onclick = function() {
	showScore(score, button_score)
}
score.parentNode.insertBefore(button_score, score)

function showScore(score, button_score) {
	score.style.visibility = "visible"
	button_score.value = "收起评分"
	button_score.onclick = function() {
		hideScore(score, button_score)
	}
}

function hideScore(score, button_score) {
	score.style.visibility = "hidden"
	button_score.value = "展开评分"
	button_score.onclick = function() {
		showScore(score,button_score)
	}
}