]>
git.saurik.com Git - cydia.git/blob - MobileCydia.app/localize.js
1 document
.addEventListener("DOMContentLoaded", function () {
2 var results
= document
.evaluate("//*[@localize]", document
, null, XPathResult
.ANY_TYPE
, null);
3 var result
, nodes
= [];
4 while (result
= results
.iterateNext())
6 for (var index
in nodes
) {
7 var node
= nodes
[index
];
8 var key
= node
.getAttribute('localize');
9 var value
= cydia
.localize(key
, node
.innerHTML
);
10 if (node
.nodeName
== 'TITLE')
11 document
.title
= value
;
13 node
.innerHTML
= value
;