// ==UserScript== // @name Cinematik Enhancer // @namespace surrealmoviez.info // @description Display changes for Cinematik // @include https://cinematik.net/details.php?id=* // @include https://cinematik.net/upload.php // @include https://cinematik.net/upload2.php // @require http://code.jquery.com/jquery-1.11.1.min.js // @version 0.0.4 // @downloadURL none // ==/UserScript== this.$ = this.jQuery = jQuery.noConflict(true); $(document).ready(function () { // Torrent details page if (document.documentURI.indexOf("details.php?id=") !== -1) { // List the IMDb ID(s) found in the description as a linked list in a dedicated row var imdbInfoRow = $('.outer .rowhead:contains("IMDB info")').parent(); var description = $('.outer .heading:contains("Description")').next('td').html(); var pattern = /(tt\d+)/gi; var found = description.match(pattern); var imdbIdRowContent = 'Nothing found in the description'; var s = ''; if (found.length > 0) { var uniqueIds = []; $.each(found, function (i, el) { if ($.inArray(el, uniqueIds) === -1) uniqueIds.push(el); }); if (uniqueIds.length > 1) { s = 's'; } var imdbIdRowContent = ""; for (var i = 0; i < uniqueIds.length; i++) { imdbIdRowContent += '' + uniqueIds[i] + ' '; } } var imdbIdRow = 'IMDb ID' + s + '' + imdbIdRowContent + ''; $(imdbIdRow).insertBefore(imdbInfoRow); } // Pre-upload page if (document.documentURI.indexOf("cinematik.net/upload.php") !== -1) { var expressSubmit = '

'; $(expressSubmit).prependTo('td.outer > form'); $('#express-checkbox').click(function () { $('form > div > div > input').prop('checked', $(this).prop('checked')); }); } });