includes/clientside/static/functions.js
changeset 1252 e34c23a35dc9
parent 1227 bdac73ed481e
child 1272 05b7645f12e6
equal deleted inserted replaced
1251:d543689ed2eb 1252:e34c23a35dc9
    38 
    38 
    39 function strToPageID(string)
    39 function strToPageID(string)
    40 {
    40 {
    41 	// Convert Special:UploadFile to ['UploadFile', 'Special'], but convert 'Image:Enano.png' to ['Enano.png', 'File']
    41 	// Convert Special:UploadFile to ['UploadFile', 'Special'], but convert 'Image:Enano.png' to ['Enano.png', 'File']
    42 	for(var i in namespace_list)
    42 	for(var i in namespace_list)
       
    43 	{
    43 		if(namespace_list[i] != '')
    44 		if(namespace_list[i] != '')
       
    45 		{
    44 			if(namespace_list[i] == string.substr(0, namespace_list[i].length))
    46 			if(namespace_list[i] == string.substr(0, namespace_list[i].length))
       
    47 			{
    45 				return [string.substr(namespace_list[i].length), i];
    48 				return [string.substr(namespace_list[i].length), i];
       
    49 			}
       
    50 		}
       
    51 	}
    46 	return [string, 'Article'];
    52 	return [string, 'Article'];
    47 }
    53 }
    48 
    54 
    49 function append_sid(url)
    55 function append_sid(url)
    50 {
    56 {