mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-06-06 12:37:14 +08:00
Add underscore to language query string regex.
This commit is contained in:
+2
-2
@@ -669,8 +669,8 @@
|
|||||||
|
|
||||||
switchLanguage: function(dom){
|
switchLanguage: function(dom){
|
||||||
var lang = $(dom).data("language");
|
var lang = $(dom).data("language");
|
||||||
if(document.location.href.search(/[\?\&]lang=[a-z]+/) != -1){
|
if(document.location.href.search(/[\?\&]lang=[a-z_]+/) != -1){
|
||||||
document.location.href = document.location.href.replace( /([\?\&]lang=)([a-z]+)/gi , "$1"+lang );
|
document.location.href = document.location.href.replace( /([\?\&]lang=)([a-z_]+)/gi , "$1"+lang );
|
||||||
}else{
|
}else{
|
||||||
document.location.href = document.location.href + ( (document.location.href.search(/\?/) != -1 )?"&":"?") + "lang="+lang;
|
document.location.href = document.location.href + ( (document.location.href.search(/\?/) != -1 )?"&":"?") + "lang="+lang;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user