From ca1926438d7396d16972616826524e096c84eaa9 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Mon, 6 Feb 2017 19:52:41 -0500 Subject: [PATCH] Add more chat shortcut links <> <> <> <> <> are now available for use. --- .htaccess | 10 ++++++++++ js/client.js | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index f36d9e134..7e0b01d5b 100644 --- a/.htaccess +++ b/.htaccess @@ -34,6 +34,16 @@ RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC] RewriteRule ^rules?\/?$ http://pokemonshowdown.com/rules [R=302,L] RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC] RewriteRule ^faq\/?$ http://www.smogon.com/forums/posts/6774128/ [R=302,L] +RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC] +RewriteRule ^credits?\/?$ http://pokemonshowdown.com/credits [R=302,L] +RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC] +RewriteRule ^news\/?$ http://pokemonshowdown.com/news [R=302,L] +RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC] +RewriteRule ^privacy\/?$ http://pokemonshowdown.com/privacy [R=302,L] +RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC] +RewriteRule ^contact\/?$ http://pokemonshowdown.com/contact [R=302,L] +RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC] +RewriteRule ^dex\/?$ http://dex.pokemonshowdown.com/ [R=302,L] RewriteCond %{HTTP_HOST} ^www\.play\.pokemonshowdown\.com$ [NC] RewriteRule ^(.*) http%{ENV:P_SUFFIX}://play.pokemonshowdown.com/$1 [R=301,L] diff --git a/js/client.js b/js/client.js index c5b945d8c..8aad94e16 100644 --- a/js/client.js +++ b/js/client.js @@ -1176,7 +1176,7 @@ if (this.host === 'play.pokemonshowdown.com' || this.host === 'psim.us' || this.host === location.host) { if (!e.cmdKey && !e.metaKey && !e.ctrlKey) { var target = this.pathname.substr(1); - var shortLinks = /^(appeals?|rooms?suggestions?|suggestions?|adminrequests?|bugs?|bugreports?|rules?|faq)$/; + var shortLinks = /^(appeals?|rooms?suggestions?|suggestions?|adminrequests?|bugs?|bugreports?|rules?|faq|credits?|news|privacy|contact|dex)$/; if (target.indexOf('/') < 0 && target.indexOf('.') < 0 && !shortLinks.test(target)) { window.app.tryJoinRoom(target); e.preventDefault();