🏠 Home 

Secret Cinema Enhancer

Display changes for Secret Cinema


Install this script?
  1. // ==UserScript==
  2. // @name Secret Cinema Enhancer
  3. // @namespace surrealmoviez.info
  4. // @description Display changes for Secret Cinema
  5. // @include http://www.secret-cinema.net/viewtopic.php?id=*
  6. // @require http://code.jquery.com/jquery-1.11.1.min.js
  7. // @grant none
  8. // @version 0.0.1
  9. // ==/UserScript==
  10. $(document).ready(function () {
  11. if ($('.firstpost .postmsg .dt_pl').length === 2) {
  12. var description = $('.firstpost .postmsg').html();
  13. var pattern = /(tt\d+)/gi;
  14. var found = description.match(pattern);
  15. if (found.length > 0) {
  16. var uniqueIds = [];
  17. $.each(found, function (i, el) {
  18. if ($.inArray(el, uniqueIds) === -1)
  19. uniqueIds.push(el);
  20. });
  21. var imdbIdRowContent = "";
  22. for (var i = 0; i < uniqueIds.length; i++) {
  23. imdbIdRowContent += '<a href="http://anonym.to/?http://www.imdb.com/title/' + uniqueIds[i] + '/" target="_blank">' + uniqueIds[i] + '</a> ';
  24. }
  25. }
  26. $('.firstpost .postmsg').prepend('<blockquote>' + imdbIdRowContent + '</blockquote>');
  27. }
  28. });