Rotten Tomatoes Movie ID Logger

This script will simply console log the movie ID of the rotten tomatoes entry you are viewing.

  1. // ==UserScript==
  2. // @name Rotten Tomatoes Movie ID Logger
  3. // @description This script will simply console log the movie ID of the rotten tomatoes entry you are viewing.
  4. //
  5. // @author Matthew Sanders <matthew@button-mashers.net>
  6. // @namespace https://github.com/Clearmist
  7. //
  8. // @license GPLv3 - http://www.gnu.org/licenses/gpl-3.0.txt
  9. //
  10. // @include http://www.rottentomatoes.com/m/*/
  11. //
  12. // @require http://code.jquery.com/jquery-1.8.0.min.js
  13. //
  14. // @version 1.0
  15. //
  16. // @run-at document-start|document-end
  17. // @unwrap
  18. // ==/UserScript==
  19. /**
  20. * This program is free software: you can redistribute it and/or modify
  21. * it under the terms of the GNU General Public License as published by
  22. * the Free Software Foundation, either version 3 of the License, or
  23. * (at your option) any later version.
  24. *
  25. * This program is distributed in the hope that it will be useful,
  26. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  27. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  28. * GNU General Public License for more details.
  29. *
  30. * You should have received a copy of the GNU General Public License
  31. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  32. */
  33. /**
  34. * SCRIPT DESCRIPTION.
  35. *
  36. * @see http://wiki.greasespot.net/API_reference
  37. * @see http://wiki.greasespot.net/Metadata_Block
  38. */
  39. (function() {
  40. $(document).ready( function() {
  41. console.log( "======== Rotten Tomatoes Movie ID ========" );
  42. console.log( $('meta[name=movieID]').attr("content") );
  43. console.log( "==========================================" );
  44. });
  45. })();