1
0
Fork 0
mirror of https://github.com/gorhill/uMatrix.git synced 2024-06-02 02:14:52 +12:00

this is a start for #29

This commit is contained in:
gorhill 2014-11-02 12:10:21 -05:00
parent 3c455d3fdc
commit 50bcc24049
2 changed files with 17 additions and 0 deletions

View file

@ -43,6 +43,13 @@
display: inline-block;
}
html {
direction: ltr;
}
html.rtl {
direction: rtl;
}
/* http://stackoverflow.com/questions/2011142/how-to-change-the-style-of-title-attribute-inside-the-anchor-tag?answertab=votes */
*[data-tip] {
position: relative;

View file

@ -23,6 +23,16 @@
// jQuery must be present at this point.
window.addEventListener('load', function() {
// http://en.wikipedia.org/wiki/Right-to-left
var rtlLanguages = {
'ar': true,
'fa': true,
'he': true
};
if ( rtlLanguages[navigator.language] ) {
uDom('html').addClass('rtl');
}
var nodeList = document.querySelectorAll('[data-i18n]');
var i = nodeList.length;
var node;