Add more chat shortcut links

<<credits>>
<<news>>
<<privacy>>
<<contact>>
<<dex>>
are now available for use.
This commit is contained in:
Guangcong Luo 2017-02-06 19:52:41 -05:00
parent 5da25b9048
commit ca1926438d
2 changed files with 11 additions and 1 deletions

View File

@ -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]

View File

@ -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();