equal
deleted
inserted
replaced
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 { |