Greasy Fork 支持简体中文。

New IMDB Message Boards - Moviechat

Directly integrated replacement on the IMDB message boards using moviechat.org, appears at bottom of all IMDB movie/tv page listings, includes millions of archived posts saved from before the boards closed.

目前為 2021-12-31 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name New IMDB Message Boards - Moviechat
  3. // @namespace https://greasyfork.org/en/users/10118-drhouse
  4. // @version 2.2.0
  5. // @description Directly integrated replacement on the IMDB message boards using moviechat.org, appears at bottom of all IMDB movie/tv page listings, includes millions of archived posts saved from before the boards closed.
  6. // @run-at document-ready
  7. // @include https://www.imdb.com/title/*
  8. // @include https://www.imdb.com/name/*
  9. // @include http://www.moviechat.org/*
  10. // @include https://www.moviechat.org/*
  11. // @exclude https://media-imdb.com/*
  12. // @exclude https://*.media-imdb.com/*
  13. // @exclude https://www.imdb.com/*trivia*
  14. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
  15. // @author drhouse
  16. // @license CC-BY-NC-SA-4.0
  17. // @icon https://www.google.com/s2/favicons?domain=imdb.com
  18. // ==/UserScript==
  19. this.$ = this.jQuery = jQuery.noConflict(true);
  20. $(document).ready(function () {
  21. var theparenturl = document.URL;
  22.  
  23. if (theparenturl.indexOf("reference") != -1)
  24. theparenturl = theparenturl.replace('reference','');
  25.  
  26. if (theparenturl.indexOf("combined") != -1)
  27. theparenturl = theparenturl.replace('combined','');
  28.  
  29. var quest = theparenturl.split('?')[0];
  30. var parts = quest.split('/');
  31. var lastSegment = parts.pop() || parts.pop();
  32.  
  33. var theurl = 'https://www.moviechat.org/movies/';
  34.  
  35. var simple = (theurl + lastSegment);
  36. //console.info(simple);
  37.  
  38. var chatdiv = $('<div></div>').css('display','block').css('overflow','hidden').css('position','relative').css('height','660px').css('width','640px');
  39.  
  40. // var lastart_old = $('.article').last();
  41. var lastart_new = $("#__next > main > div > section.ipc-page-background.ipc-page-background--base.DefaultPageLayout__StyledPageBackground-sc-1nrcguw-0.NmMbf > div > section > div > div.TitleMainBelowTheFoldGroup__TitleMainPrimaryGroup-sc-1vpywau-0.hpUBWe.ipc-page-grid__item.ipc-page-grid__item--span-2 > section:nth-child(36)")
  42. // $(chatdiv).insertBefore(lastart_old);
  43.  
  44. setTimeout(function(){
  45. $(chatdiv).insertAfter(lastart_new);
  46. }, 1000);
  47.  
  48. //lazy else
  49. $(chatdiv).insertBefore('#tn15bot');
  50.  
  51. var ifrm = document.createElement("iframe");
  52. ifrm.setAttribute("id", "msgframe");
  53. ifrm.setAttribute("src", simple);
  54. ifrm.setAttribute("style", "scrolling=no;position=absolute;padding=0px");
  55. ifrm.setAttribute("frameborder", "0");
  56. ifrm.style.height = 600+"px";
  57. ifrm.style.width = 640+"px";
  58. $(ifrm).appendTo(chatdiv);
  59.  
  60. $('body').css('background-color','#fff');
  61. $('.main').css('box-shadow','0px 0px 0px 0px');
  62.  
  63.  
  64. });