From 57e571d241875e867ba5d419fc71cd47c1792a67 Mon Sep 17 00:00:00 2001 From: Matt Amos Date: Thu, 2 Jul 2009 16:40:29 +0000 Subject: [PATCH] Changed shortlink zoom level correction char to '-', as this seems to fare better with twitter et al.'s URL highlighting. Decoder is backwards-compatible with the old system. --- lib/short_link.rb | 2 +- public/javascripts/site.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/short_link.rb b/lib/short_link.rb index afcf1ef37..b91d7e569 100644 --- a/lib/short_link.rb +++ b/lib/short_link.rb @@ -57,7 +57,7 @@ module ShortLink # append characters onto the end of the string to represent # partial zoom levels (characters themselves have a granularity # of 3 zoom levels). - ((z + 8) % 3).times { str << "=" } + ((z + 8) % 3).times { str << "-" } return str end diff --git a/public/javascripts/site.js b/public/javascripts/site.js index b7ad7d7e4..59999b8c0 100644 --- a/public/javascripts/site.js +++ b/public/javascripts/site.js @@ -231,7 +231,7 @@ function makeShortCode(lat, lon, zoom) { str += char_array.charAt(digit); } for (var i = 0; i < ((zoom + 8) % 3); ++i) { - str += "="; + str += "-"; } return str; } -- 2.43.2