பயனர்:Shrikarsan/common.js

விக்கிமூலம் இலிருந்து

குறிப்பு - சேமித்த பின்னர், நீங்கள் செய்த மாற்றங்களைக் காண்பதற்கு உங்கள் உலவியின் இடைமாற்று அகற்றப்பட வேண்டும்.

  • மொஸில்லா பயர்பாக்ஸ் / சபாரி: Shift+Reload, அல்லது Ctrl-F5 அல்லது Ctrl-R (⌘-R Mac ல்)
  • கூகிள் குரோம் Ctrl-Shift-R அழுத்தவும். (⌘-Shift-R Mac ல்) ;
  • இண்டர்நெட் எக்ஸ்ப்ளோரர்: Ctrl-Refresh அல்லது Ctrl-F5 ஐ அழுத்தவும்.
  • ஒபேரா: Tools → Preferences இல் இடைமாற்றை அகற்றவும்;
mw.loader.using( 'mediawiki.util', function () {
	var showNotice = function () {
 
		// Stick a "Watchlist update!" notice after the notification count
		$( "#pt-notifications" ).after(
        	$( "<li>" ).append( $( "<a>" )
        		.text( "Watchlist update!" )
        		.css( {
        			"background-color": "green",
        			"color": "white",
        			"border-radius": "2px",
        			"padding": "0.25em 0.45em 0.2em",
        			"cursor": "pointer",
        			"font-weight": "bold",
        			"transition": "background-color 0.5s"
        		} )
        		.attr( "href", "/wiki/Special:Watchlist" )
        		.mouseover( updateNotice )
        		.click( function( e ) {
    						
			$( '#watchlist-update-notice' ).hide();
			e.preventDefault();
		} )
        	)
        	.attr( "id", "watchlist-update-notice" )
        );
	};
	
	var updateNotice = function() {
		// Lighten the background color so the user knows we're updating
		$( "#watchlist-update-notice a" ).css( "background-color", "#7bff7b" );
		
		// Update the notice
		$.getJSON(
    		mw.util.wikiScript( 'api' ),
    		{
    			format: "json",
    			action: "query",
    			list: "watchlist",
    			
    			title:"மலையாளப் பழமொழிகள்",
    			
    			wlshow: "unread",
    			wllimit: 1 // Because we're checking if there are *any* entries
    		} ).done(function( data ) {
    			if( !data.query ) return;
    			if( data.query.watchlist.length ) {
 
    				// There are new watchlist diffs to read, so show notice
    				if( !$( "#watchlist-update-notice" ).length ) {
    					
    					// That is, if it isn't shown already
    					showNotice();
    					
    				} else {
    					$( '#watchlist-update-notice' ).click( function( e ) {
    						
			$( '#watchlist-update-notice' ).hide();
			e.preventDefault();
		} );
    					// There's already a notice, so change background
    					//$( "#watchlist-update-notice a" ).css( "background-color", "green" );
    				}
    			} else {
    				
    				// No new watchlist diffs to read, so hide notice
    				$( "#watchlist-update-notice" ).remove();
    			}
    		}
    	);
	};
	
    $( document ).ready( function () { 
	    updateNotice();
    } );
} );
if (wgPageName =='சிறப்பு:Watchlist'){
$( "#watchlist-update-notice" ).remove();
}
"https://ta.wikisource.org/w/index.php?title=பயனர்:Shrikarsan/common.js&oldid=26847" இலிருந்து மீள்விக்கப்பட்டது