v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "User:Lethosor/outdated warning.js"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m (fix mainspace pages)
m (fix)
Line 1: Line 1:
 
// Warning when visiting an outdated page from an external site (e.g. Google)
 
// Warning when visiting an outdated page from an external site (e.g. Google)
if(document.referrer && document.referrer.indexOf(document.domain) == -1 && ['v0.31 40d 23a'].split(' ').indexOf(wgCanonicalNamespace)!=-1){
+
if(document.referrer && document.referrer.indexOf(document.domain) == -1 && 'v0.31 40d 23a'.split(' ').indexOf(wgCanonicalNamespace)!=-1){
 
   $('<div>').attr('class','usermessage').css({borderColor:'red', backgroundColor:'#fdb',fontWeight:'normal'}).html('This page is about an <strong>older version</strong> of Dwarf Fortress. Click the v0.34.11 link in the box below to view the current version of this page.').prependTo('#bodyContent')
 
   $('<div>').attr('class','usermessage').css({borderColor:'red', backgroundColor:'#fdb',fontWeight:'normal'}).html('This page is about an <strong>older version</strong> of Dwarf Fortress. Click the v0.34.11 link in the box below to view the current version of this page.').prependTo('#bodyContent')
 
}
 
}

Revision as of 18:51, 5 May 2014

// Warning when visiting an outdated page from an external site (e.g. Google)
if(document.referrer && document.referrer.indexOf(document.domain) == -1 && 'v0.31 40d 23a'.split(' ').indexOf(wgCanonicalNamespace)!=-1){
  $('<div>').attr('class','usermessage').css({borderColor:'red', backgroundColor:'#fdb',fontWeight:'normal'}).html('This page is about an <strong>older version</strong> of Dwarf Fortress. Click the v0.34.11 link in the box below to view the current version of this page.').prependTo('#bodyContent')
}