User:TestBotOnly/index2.html.js

 display: none; } position: relative; overflow: hidden; margin-bottom: 0.5em !important; background-color: #d7e4fa; background-repeat: repeat-x; border: solid 1px #a7d7f9; display: none; } position:relative; padding: 20px; text-align: center; } position: absolute; top: 20px; left: 25px; background-image: url(http://upload.wikimedia.org/wikipedia/commons/thumb/1/12/Wikimedia_logo_text_RGB.svg/60px-Wikimedia_logo_text_RGB.svg.png); height: 60px; width: 60px; background-repeat: no-repeat; } position: absolute; z-index: 98; top: 0px; right: 0px; float: right; font-size: 0em; }			      var constSamplingRate = ; var constDisplayTimeSpan = ; var constDone = 'done'; var constTodo = 'todo'; $(document).ready( function {	wmdeslog( '$(document).ready' );	// If the survey should not be hidden...	if ( $.cookie( 'surveyStatus2' ) != constDone ) 	{		initSurveyIfNeeded;	} } ); function initSurveyIfNeeded {	wmdeslog( 'initSurveyIfNeeded' ); // If the users has been picked to participate in the survey if ( $.cookie( 'surveyStatus2' ) == constTodo ) {		var startTime = $.cookie( 'surveyStartTime2' ); // If the start of the survey is set, display it when still within 5 mins, otherwise set done. if ( startTime != null ) {				if ( parseInt( startTime ) + ( 1000*60* constDisplayTimeSpan ) > (new Date).getTime ) {					displaySurvey; }				else {					//hide banner on next visit setSurveyStatus( constDone ); if (wgNoticeToggleState) toggleNotice; }		}			// If the start of the survey is not set, check for the right page (first page that is not an "action" page) else if ( window.location.toString.indexOf( 'action=' ) == -1 ) {			$.cookie( 'surveyStartTime2', (new Date).getTime.toString, { 'expires': 31 /* days */, 'path': '/' } ); displaySurvey; }	}	else {		// If the user is an editor, do lottery. if ( window.location.toString.indexOf( 'action=edit' ) != -1 ) {			var selectionSize = constSamplingRate ; // If the user wins the lottery, set DisplayTodo if ( Math.random < selectionSize ) {				setSurveyStatus( constTodo ); //show banner on next visit if (!wgNoticeToggleState) toggleNotice; } 			// If the user loses, set done. else {				//hide banner on next visit setSurveyStatus( constDone ); if (wgNoticeToggleState) toggleNotice; }		}		else {		// (If the user is not an editor, hide banner.) if (wgNoticeToggleState) toggleNotice; }	} } function setSurveyStatus( status ) {	wmdeslog( 'setSurveyStatus: ' + status ); $.cookie( 'surveyStatus2', status, { 'expires': 31 /* days */, 'path': '/' } ); } function displaySurvey {	wmdeslog( 'displaySurvey' ); $( '#editorSurveyLink' ).click( onSurveyLinkClick ); $( '#editorSurveyClose' ).click( onSurveyCloseClick ); if (!wgNoticeToggleState) toggleNotice;
 * 1) centralNotice.collapsed #editorSurvey2011 {
 * 1) editorSurvey2011 {
 * 1) editorSurvey2011-content {
 * 1) editorSurvey2011-logo {
 * 1) editorSurvey2011 #cn-toggle-box {

$( '#editorSurvey2011' ).show; } var isFirstClick = true; function onSurveyLinkClick {	wmdeslog( 'onSurveyLinkClick' ); if ( isFirstClick ) {		wmdeslog( 'onSurveyLinkClick - first click' ); setSurveyStatus(constDone); var sender = $( this ); sender.attr( 'href', sender.attr( 'href' ) + Math.random.toString );

//hide banner on next visit if (wgNoticeToggleState) toggleNotice;

isFirstClick = false; } 	return true; } function onSurveyCloseClick {	//hide banner *immediately* $( '#editorSurvey2011' ).hide; setSurveyStatus( constDone ); if (wgNoticeToggleState) toggleNotice; } function wmdeslog( message ) { //console.log( 'WMDE survey: ' + message ); }