MediaWiki:Wikia.js

var rating = null;

$('#article-comm-submit').after(' ' + ratingStar(1) + ratingStar(2) + ratingStar(3) + ratingStar(4) + ratingStar(5) +' ');

function ratingStar(num) { return ''; }

function ratingHover(num) { if(rating === null) { for(i = 1; i <= num; i++) { document.getElementById('RatingStar' + i).src="http://images4.wikia.nocookie.net/__cb20111216185145/filmguide/images/2/2e/Star.png"; } } }

function ratingOff { if(rating === null) { $('#RatingSelector img').attr('src', "http://images1.wikia.nocookie.net/filmguide/images/3/30/Star-deselcted.png"); } }

function removeRating { rating = null; var ratingcommbox = document.getElementById('article-comm').value; ratingcommbox = ratingcommbox.replace(' ', ''); ratingcommbox = ratingcommbox.replace(' ', ''); ratingcommbox = ratingcommbox.replace(' ', ''); ratingcommbox = ratingcommbox.replace(' ', ''); ratingcommbox = ratingcommbox.replace(' ', ''); $('#article-comm').val(ratingcommbox); ratingOff $('#unrater').remove; }

function ratingClick(num) { if(rating === null) $('#RatingSelector').append('(unrate) '); rating = ' '; $('#RatingSelector img').attr('src', "http://images1.wikia.nocookie.net/filmguide/images/3/30/Star-deselcted.png"); for(i = 1; i <= num; i++) { document.getElementById('RatingStar' + i).src="http://images4.wikia.nocookie.net/__cb20111216185145/filmguide/images/2/2e/Star.png"; } ratingSelectorChanged; }

function ratingSelectorChanged { var ratingcommbox = document.getElementById('article-comm').value; ratingcommbox = ratingcommbox.replace(' ', ''); ratingcommbox = ratingcommbox.replace(' ', ''); ratingcommbox = ratingcommbox.replace(' ', ''); ratingcommbox = ratingcommbox.replace(' ', ''); ratingcommbox = ratingcommbox.replace(' ', ''); $('#article-comm').val( ratingcommbox + rating); }

setInterval("ratingSelectorMiniEditorHide", 2000);

function ratingSelectorMiniEditorHide { if($('cke_button_ModeSource').hasClass('cke_off')) {$('RatingSelector').hide} else {$('RatingSelector').show} }