1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

get headroom from bower

This commit is contained in:
Luke Pulverenti 2015-11-28 15:39:14 -05:00
parent 77e3111ad1
commit 27c3bdc042
58 changed files with 1224 additions and 3803 deletions

View file

@ -1,5 +1,32 @@
var LibraryBrowser = (function (window, document, $, screen) {
// Regular Expressions for parsing tags and attributes
var SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
// Match everything outside of normal chars and " (quote character)
NON_ALPHANUMERIC_REGEXP = /([^\#-~| |!])/g;
/**
* Escapes all potentially dangerous characters, so that the
* resulting string can be safely inserted into attribute or
* element text.
* @param value
* @returns {string} escaped text
*/
function htmlEncode(value) {
return value.
replace(/&/g, '&').
replace(SURROGATE_PAIR_REGEXP, function (value) {
var hi = value.charCodeAt(0);
var low = value.charCodeAt(1);
return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';
}).
replace(NON_ALPHANUMERIC_REGEXP, function (value) {
return '&#' + value.charCodeAt(0) + ';';
}).
replace(/</g, '&lt;').
replace(/>/g, '&gt;');
}
var pageSizeKey = 'pagesize_v4';
var libraryBrowser = {
@ -27,7 +54,7 @@
getSavedQueryKey: function (modifier) {
return getWindowUrl().split('#')[0] + (modifier || '');
return window.location.href.split('#')[0] + (modifier || '');
},
loadSavedQueryValues: function (key, query) {
@ -139,12 +166,6 @@
return false;
}
if (typeof ($.browser.androidVersion) == 'number' && !isNaN($.browser.androidVersion)) {
if ($.browser.androidVersion < 5) {
return false;
}
}
return false;
},
@ -378,7 +399,7 @@
}
var afterNavigate = function () {
if (getWindowUrl().toLowerCase().indexOf(url.toLowerCase()) != -1) {
if (window.location.href.toLowerCase().indexOf(url.toLowerCase()) != -1) {
var pages = this.querySelector('neon-animated-pages');
@ -408,7 +429,7 @@
}
};
if (getWindowUrl().toLowerCase().indexOf(url.toLowerCase()) != -1) {
if (window.location.href.toLowerCase().indexOf(url.toLowerCase()) != -1) {
afterNavigate.call($($.mobile.activePage)[0]);
} else {