subtitleLinks

Basic script for imdb.com.This script is provide to subtitle link of movie.

  1. // ==UserScript==
  2. // @name subtitleLinks
  3. // @version 1.0
  4. // @namespace akursat.com/script
  5. // @author akursat
  6. // @description Basic script for imdb.com.This script is provide to subtitle link of movie.
  7. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
  8. // @include http://www.imdb.com/title/*
  9. // @run-at document-end
  10. // ==/UserScript==
  11.  
  12. /* @require annotation need version 0.8. You must sure running with Greasemonkey version 0.8.
  13. */
  14.  
  15.  
  16. //Avoiding some conflit.
  17. this.$ = this.jQuery = jQuery.noConflict(true);
  18.  
  19. $(document).ready(function() {
  20. //Get title of Movie
  21. function getTitle() {
  22. var title = $('h1.header').children('.itemprop').text();
  23. return title;
  24. }
  25. //Create container.
  26. function createDiv() {
  27. $('#img_primary').append(
  28. $('<div/>')
  29. .attr("id", "container")
  30. .addClass("container")
  31. .css("border", "none")
  32. .css("width", "190px")
  33. .css("margin-left", "10px")
  34. .css("margin-top", "10px")
  35. );
  36. }
  37. //Create fav icons.
  38. function createFavIcon(id, src, href) {
  39. $('#container').append(
  40. $('<a/>')
  41. .attr("id", id)
  42. .attr("href", href)
  43. .attr("target", "_blank")
  44. .html(
  45. $('<img/>')
  46. .attr("src", src)
  47. .css("border","5px;none;")
  48. )
  49. );
  50. $('#' + id).css('padding-left', "10px");
  51. }
  52.  
  53. //Create search links.
  54. var movie_name = getTitle();
  55. var turkcealtyazi = "http://www.turkcealtyazi.org/find.php?cat=sub&find=" + movie_name;
  56. var turkcealtyaziImg = "http://www.turkcealtyazi.org/images/favicon.ico";
  57.  
  58. var divxplanet = "http://divxplanet.com/index.php?page=arama&arama=" + movie_name;
  59. var divxplanetImg = "http://divxplanet.com/favicon.ico";
  60.  
  61. var opensubtitle = "http://www.opensubtitles.org/en/search2/sublanguageid-all/moviename-" + movie_name;
  62. var opensubtitleImg = "http://static.opensubtitles.org/favicon.ico";
  63.  
  64. createDiv();
  65. createFavIcon("turkcealtyaziImg", turkcealtyaziImg, turkcealtyazi);
  66. createFavIcon("divxplanetImg", divxplanetImg, divxplanet);
  67. createFavIcon("opensubtitleImg", opensubtitleImg, opensubtitle);
  68.  
  69. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址