Last active
August 29, 2015 14:04
-
-
Save BenMQ/c480b9040d75538a3f82 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(!function($){ | |
var data; | |
if ((typeof user != 'undefined') && user.quests && (data = user.quests.QuestSunkenCity) && data.is_diving) { | |
var output = ''; | |
for (var i = 0; i < data.zones.length; i++) { | |
var zone = data.zones[i]; | |
if (zone.num === data.active_zone) { | |
output += (zone.length + 'm ' + zone.name + ' (' + (zone.width-80+zone.left)/0.6 + 'm left)\n'); | |
} else if (zone.num > data.active_zone) { | |
output += (zone.length + 'm ' + zone.name + '\n'); | |
} | |
} | |
alert(output); | |
} else { | |
alert('Not diving!'); | |
} | |
}(jQuery)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment