-
Notifications
You must be signed in to change notification settings - Fork 0
/
imdb.user.js
57 lines (53 loc) · 1.42 KB
/
imdb.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
// ==UserScript==
// @name IMDb layout changer
// @namespace jnyrup
// @description Change the layout of IMDb. `show` specifies the order in which the elements should be listed. `hide` specifies elements that should be hidden.
// @version 1.0
// @author Jonas Nyrup
// @match http://www.imdb.com/title/*
// @match http://www.imdb.com/title/*/*
// @grant none
// ==/UserScript==
(function () {
'use strict';
/*
list of currently available id's
[
"boardsTeaser", Message Boards
"titleCast", Cast
"titleDetails", Details
"titleDidYouKnow", Did You Know?
"titleFAQ", Frequently Asked Questions
"titleMediaStrip", Videos, pictures and trailers
"titleProduction", Production Notes from IMDbPro (shown on incomplete films)
"titleRecs", People who liked this also liked...
"titleStoryLine" Storyline
];
*/
// CHANGE THIS PART:
var show = [
"titleStoryLine",
"titleCast",
"titleDetails",
"titleRecs",
"boardsTeaser",
"titleDidYouKnow",
"titleFAQ"
];
var hide = [
"titleMediaStrip",
"titleProduction"
];
// STOP CHANGING
hide.forEach(function(id){
var div = document.getElementById(id);
if(div !== null)
div.style.display = 'none';
});
show.reverse().forEach(function(id){
var ref = document.getElementsByClassName('title-overview')[0];
var div = document.getElementById(id);
if(div !== null)
ref.parentNode.insertBefore(div, ref.nextSibling);
});
}());