]>
git.saurik.com Git - cydia.git/blob - Cydia.app/localize.js
9be82d0abe6b192c99fe3397cd41d98362b2a88b
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
;