Travian Analyzer Bookmarklet

Installation

First, save a bookmark with title “Analyze” and the location

javascript:top.location.href=((String(window.getSelection()).length>0)?'http://travian.ws/analyser.pl?s=de7&q='+window.getSelection():top.location.href.replace(/http:\/\/welt7\.travian\.de\/(spieler|allianz)\.php\?/,'http://travian.ws/analyser.pl?s=de7&'))

Now, update the bookmark and replace “welt7.travian.de” with your Travian server address and “travian.ws/analyser.pl?s=de7” with your Travian Analyzer address.

Usage

Source

And here is the code again, in a more readable way:

javascript:
top.location.href=(
  (String(window.getSelection()).length>0)
  ?
  'http://travian.ws/analyser.pl?s=de7&q='+window.getSelection()
  :
  top.location.href.replace(/http:\/\/welt7\.travian\.de\/(spieler|allianz)\.php\?/,'http://travian.ws/analyser.pl?s=de7&')
)