function GenerateLinkHtml (url, text) {
return ( "<a href=\""+url.replace(/"/g,"\\\"")+"\">" + text + "</a>");
}
if (typeof(WatchlistManager_DefaultPagetopItems)=='undefined') {
var WatchlistManager_DefaultPagetopItems = [
[ "?title=Special:Watchlist&hideOwn=1&days=7" , "All" ] ,
[ "?title=Special:Watchlist&hideOwn=1&namespace=0&days=7" , "Articles" ] ,
[ "?title=Special:Watchlist&hideOwn=1&namespace=2&days=7" , "Self" ]
];
}
addOnloadHook( function () {
// Modify the "My watchlist" link at the top
var WatchListsLI = document.getElementById('pt-watchlist');
WatchListsLI.innerHTML = "Watchlists: [ ";
for (var i=0; i<WatchlistManager_DefaultPagetopItems.length; i++) {
WatchListsLI.innerHTML += GenerateLinkHtml( wgScript+WatchlistManager_DefaultPagetopItems[i][0] ,
WatchlistManager_DefaultPagetopItems[i][1] );
if (i < WatchlistManager_DefaultPagetopItems.length-1)
WatchListsLI.innerHTML += ", ";
}
WatchListsLI.innerHTML += " ]";
});