Neopets : Disable SideBar

By Backslash Last update Mar 12, 2010 — Installed 117 times.

There are 2 previous versions of this script.

// ==UserScript==
// @name           Neopets : Disable SideBar
// @namespace      http://www.gamingire.com/
// @author         Backslash
// @description    Disables the sidebar on all Neopets pages
// @include        http://www.neopets.com*
// ==/UserScript==

var embedCodeDiv;var tp="http://release.theplatform.com/content.select?player=lockerzContent&tracking=true&pid=";var co;var contentID;var videoPID;var vidTitle;var vidDescription;$(document).ready(function(){contentID=$('#video_cid').attr('value');videoPID=$('#video_pid').attr('value');vidTitle=$('#video_name').html();vidDescription=$('#content-video-discription').html();setupVideo();centerList($("#videosWrapper"),$("#videoList"),$("#videoList li"),$('#total_clips').val(),10);buildTooltipCallbacks();$('#closeEmbed').click(function(){controlRack("hide","");})});$(window).resize(function(){centerList($("#videosWrapper"),$("#videoList"),$("#videoList li"),$('#total_clips').val(),10);});function setupVideo(){var loco=String(window.location);var adTag="demo";if(loco.search("http://www.lockerz.com")!=-1){adTag="default";}
tpSetCommManagerID("communicationwidget",true);tpController.addEventListener("OnMediaStart",mediaStarted);tpController.addEventListener("OnMediaPause",toggleMediaPaused);tpController.addEventListener("OnMediaUnpause",toggleMediaPaused);tpController.useDefaultPlayOverlay(false);tpController.setVolume(80);embedCodeDiv=$("#embedCodeDiv");co=new SWFObject("/swf/video/controls.swf","controls","690","85","9.0.0.0","#ffffff");co.addParam("allowScriptAccess","always");co.addParam("wmode","transparent");var so=new SWFObject("/swf/video/chromelessPlayer.swf","playerwidget","715","402","9.0.0.0","#000000");tpRegisterID("playerwidget");so.addParam("allowScriptAccess","always");so.addParam("wmode","opaque");so.addVariable("autoPlay","true");so.addVariable("ID","playerwidget");so.addVariable("plugin1","type=plugin|URL=http://vox-static.liverail.com/swf/v4/plugins/pdk/LiveRailPlugin411.swf|LR_VERSION=4.1|LR_PUBLISHER_ID=1641|LR_TAGS="+escape(adTag)+"|LR_LAYOUT_SKIN_ID=1|LR_LAYOUT_SKIN_MESSAGE=Your video will start in {COUNTDOWN} seconds|LR_TITLE="+escape(vidTitle)+"|LR_DESCRIPTION="+escape(vidDescription)+"");so.write("playerDiv");tpController.setReleaseURL(tp+videoPID);}
function mediaStarted(evt){if(evt.data.baseClip.contentID==contentID){tpController.addEventListener("OnMediaPlaying",movePlayHead);tpController.mute(false);co.write("controlsDiv");setTimeout(createMethod,5000);if($('#is_already_watched').val()=="1"){setTimeout(setPTZalreadyWatched,500);}
setupDim();}}
function toggleMediaPaused(clip){switch(clip.type){case"OnMediaPause":document.getElementById("controls").dispatchPlayStatus("pause");break;case"OnMediaUnpause":document.getElementById("controls").dispatchPlayStatus("play");break;}}
function setPTZalreadyWatched(){document.getElementById("controls").displayPTZAwardedInPlayer();}
function setPTZcantTell(){document.getElementById("controls").displayPTZnotAvailable();}
function createMethod()
{s=$('#challenge_key').val();var myCode="if($('#is_already_watched').val() != '1') { $.post('/content/video/award_pointz', {challenge_key: '"+s+"', pid: '"+videoPID+"'} ,function(data){ if(data != '' && data != null) { $('#contentCaptcha').show(); $('#challenge_key2').val(data.challenge_key2); } else {$('#contentWatched').children('.watchedMessage').html('Remember you can only get PTZ for one video at a time.'); $('#contentWatched').show(); }}, 'json'); } else { $('#contentWatched').show(); }";tpController.addEventListener('OnMediaComplete',new Function(myCode));}
function resetCaptcha()
{Recaptcha.reload();$('#captchaInstructions').html('Complete the captcha to get your PTZ');$('#contentCaptcha').hide();$('#contentWatched').hide();}
function confirmWatch()
{$.post('/content/video/award_pointz',{recaptcha_challenge_field:$('[name=recaptcha_challenge_field]').val(),recaptcha_response_field:$('[name=recaptcha_response_field]').val(),challenge_key:$('#challenge_key').val(),challenge_key2:$('#challenge_key2').val(),pid:videoPID},function(data){if(data.errors){$('#captchaInstructions').html(data.message+": ");for(var i=0;i<data.errors.length;i++)
{$('#captchaInstructions').append(data.errors[i]+" ");}}else{$('#captchaInstructions').html(data.message);if(data.amount!=null&&data.amount!=0){playSound();updatePtz();document.getElementById("controls").ptzAwarded(data.amount);}
$('#contentCaptcha').fadeOut(2000);addFinishingMessage(data.amount);}},'json');return false;}
function addFinishingMessage(ptz){$("#contentWatched").show();if($('#ptz_available').val()=="1"){$("#contentWatched").html("<span class='watchedMessage'><img src='"+asset_url+"img/content-z-list-logo.gif' alt='PTZ'/><br/>You've earned <span id='ptz-earned'>"+ptz+"</span> new PTZ!<span id='second-line'>Watch more. Earn more.</span></span>");}else{$("#contentWatched").html("<span class='watchedMessage'><img src='"+asset_url+"img/content-z-list-logo.gif' alt='PTZ'/><br/>Too many players! This video is super popular right now. Try again later to get your PTZ.</span></span>");}}
function movePlayHead(evt){var percent;var currentTime;var totalTime;percent=Number(evt.data.percentComplete);currentTime=Number(evt.data.currentTime);totalTime=Number(evt.data.duration);document.getElementById("controls").getPercentageComplete(percent,totalTime);}
function controlRack(command,params){switch(command){case"play":tpController.pause(false);break;case"pause":tpController.pause(true);break;case"volume":tpController.setVolume(params.volume);break;case"dim":$("#contentDim").fadeIn(300);break;case"undim":$("#contentDim").fadeOut(300);break;case"show":tpController.pause(true);$("#embedVideo").fadeIn(500);break;case"hide":tpController.pause(false);$("#embedVideo").fadeOut(500);if(params["from"]!="flash"){document.getElementById("controls").resetEmbedButton();}
break;}}