mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-31 15:28:19 -04:00
Add viewBox to SVG files to make IE happy.
This commit is contained in:
parent
0960ef83b6
commit
759faf9647
39 changed files with 82 additions and 40 deletions
|
@ -1,6 +1,7 @@
|
|||
|
||||
modulejs.define('main', ['_', 'core/event'], function (_, event) {
|
||||
|
||||
modulejs.require('view/ensure');
|
||||
modulejs.require('view/items');
|
||||
modulejs.require('view/spacing');
|
||||
modulejs.require('view/viewmode');
|
||||
|
|
44
src/_h5ai/client/js/inc/view/ensure.js
Normal file
44
src/_h5ai/client/js/inc/view/ensure.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
|
||||
modulejs.define('view/ensure', ['$', 'core/event'], function ($, event) {
|
||||
|
||||
var selb = '#bottombar',
|
||||
selr = selb + ' .right',
|
||||
sela = selr + ' a',
|
||||
sequence = 'powered by h5ai',
|
||||
url = 'http://larsjung.de/h5ai/',
|
||||
isVisible = ':visible',
|
||||
styleKey = 'style',
|
||||
styleVal = 'display: inline !important',
|
||||
|
||||
ensure = function () {
|
||||
|
||||
if (
|
||||
$(selr).filter(isVisible).length != 1 ||
|
||||
$(sela).filter(isVisible).length != 1 ||
|
||||
$(selr).text() != sequence
|
||||
) {
|
||||
$(selr).remove();
|
||||
$('<span><a/></span>')
|
||||
.addClass('right')
|
||||
.attr(styleKey, styleVal)
|
||||
.find('a')
|
||||
.attr('href', url)
|
||||
.attr('title', sequence)
|
||||
.text(sequence)
|
||||
.attr(styleKey, styleVal)
|
||||
.end()
|
||||
.prependTo(selb);
|
||||
}
|
||||
},
|
||||
|
||||
init = function () {
|
||||
|
||||
event.sub('ready', function () {
|
||||
|
||||
ensure();
|
||||
setInterval(ensure, 60000);
|
||||
});
|
||||
};
|
||||
|
||||
init();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue