fix lichess links in chats

pull/1/merge
Thibault Duplessis 2012-06-01 01:44:34 +02:00
parent 4b7fce986f
commit cb291537ec
3 changed files with 2 additions and 6 deletions

View File

@ -7,7 +7,7 @@ import play.api.templates.Html
trait AssetHelper {
val assetVersion = 6
val assetVersion = 7
def cssTag(name: String) = css("stylesheets/" + name)

View File

@ -249,6 +249,6 @@ if (lichess.onProduction) {
}
function urlToLink(text) {
var exp = /\bhttp:\/\/[a-z]{0,3}\.(lichess\.org[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
var exp = /\bhttp:\/\/(?:[a-z]{0,3}\.)?(lichess\.org[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
return text.replace(exp,"<a href='http://$1'>$1</a>");
}

4
todo
View File

@ -1,5 +1,4 @@
chat should autoscroll only when at bottom
back button to game -> old status
finish flagged game
It's possible to join your own game and win it, which will then be displayed as a win and I saw players who abuse this to manipulate their stats.
hide logout button
@ -33,10 +32,7 @@ pie elo chart
guess friend list
profile edition
nb-playing is wrong (mongo date?)
chat highlight links without language subdomain
new elo system http://en.wikipedia.org/wiki/Glicko_rating_system
game count cache not working (!)
rematch game not displayed http://lichess.org/knnyltdc (and no view rematch link)
new translations:
-rematchOfferCanceled=Rematch offer canceled