MovieChat.org Message Boards on IMDb.com [Desktop]

Based on drhouse's script, bring message boards back on IMDb by using MovieChat.org boards.

اعتبارا من 04-05-2017. شاهد أحدث إصدار.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name               MovieChat.org Message Boards on IMDb.com [Desktop]
// @namespace          https://greasyfork.org/en/users/105361-randomusername404
// @version            1.80
// @description        Based on drhouse's script, bring message boards back on IMDb by using MovieChat.org boards.
// @run-at             document-start
// @include            http://*.imdb.com/title/*
// @include            http://*.imdb.com/name/*
// @include            http://www.moviechat.org/*
// @include            https://www.moviechat.org/*
// @exclude            http://m.imdb.com/*
// @exclude            http://www.imdb.com/title/*/trivia?tab=mc&ref_=tt_trv_cnn
// @exclude            http://www.imdb.com/title/*/technical?ref_=tt_dt_spec
// @require            http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @author             RandomUsername404
// @icon               http://ia.media-imdb.com/images/G/01/imdb/images/favicon-2165806970._CB522736556_.ico
// ==/UserScript==
this.$ = this.jQuery = jQuery.noConflict(true);
$(document).ready(function () {
	  var height = $(window).height()*0.9;
		var theparenturl = document.URL;
	
	if (theparenturl.indexOf("reference") != -1)
		theparenturl = theparenturl.replace('reference','');
	
	if (theparenturl.indexOf("combined") != -1)
		theparenturl = theparenturl.replace('combined','');

	var quest = theparenturl.split('?')[0];
	var parts = quest.split('/');
	var lastSegment = parts.pop() || parts.pop();

	var theurl = 'http://www.moviechat.org/movies/';
	
	var simple = (theurl + lastSegment);
	//console.info(simple);  
	
	var chatdiv = $('<div class="article" id="boardsTeaser"><h2>Message Boards</h2></div>').css('display','block').css('overflow','hidden').css('position','relative').css('height',height).css('width','640px');

	var lastart = $('.article').last();
	$(chatdiv).insertBefore(lastart);
	//lazy else
	$(chatdiv).insertBefore('#tn15bot');

	var ifrm = document.createElement("iframe");
	ifrm.setAttribute("id", "msgframe");
	ifrm.setAttribute("src", simple);
	ifrm.setAttribute("style", "scrolling=no;position=absolute;padding=0px");
	ifrm.setAttribute("frameborder", "0");
	ifrm.style.height = height+"px";
	ifrm.style.width = 640+"px";
	$(ifrm).appendTo(chatdiv);

	$('body').css('background-color','#fff');
	$('.main').css('box-shadow','0px 0px 0px 0px');

	var title = $('#title-overview-widget > div.vital > div.title_block > div > div.titleBar > div.title_wrapper > h1').text();
	var year = $('#titleYear > a').text();
	$('<div class="article"><a href='+simple+'>Discuss '+title+'</a> on the Moviechat message boards »</div><hr>').insertAfter(chatdiv);
	$('.contribute').css('border-top','1px;solid;#ccc');

});