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

update components

This commit is contained in:
Luke Pulverenti 2016-05-21 22:29:03 -04:00
parent 6f2b1c2ef8
commit 69fad5e57d
9 changed files with 179 additions and 112 deletions

View file

@ -16,12 +16,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.1.55",
"_release": "1.1.55",
"version": "1.1.56",
"_release": "1.1.56",
"_resolution": {
"type": "version",
"tag": "1.1.55",
"commit": "c985db6d4a2c6013dcb3bcb200532144a909732c"
"tag": "1.1.56",
"commit": "f0c16b99c8523abcbd5f514d938e520448d6349d"
},
"_source": "https://github.com/MediaBrowser/Emby.ApiClient.Javascript.git",
"_target": "^1.1.51",

View file

@ -215,7 +215,7 @@
return connectUser;
};
var minServerVersion = '3.0.5818';
var minServerVersion = '3.0.5821';
self.minServerVersion = function (val) {
if (val) {

View file

@ -16,12 +16,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.3.52",
"_release": "1.3.52",
"version": "1.3.54",
"_release": "1.3.54",
"_resolution": {
"type": "version",
"tag": "1.3.52",
"commit": "c00f1f1e92a8572cd01145ad02137e3eb74442fd"
"tag": "1.3.54",
"commit": "5b18c68f85be83718bb5c653da5baeed956bb2bb"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.0",

View file

@ -132,17 +132,20 @@
html += '<div class="actionSheetScroller hiddenScrollY">';
options.items.forEach(function (o) {
o.ironIcon = o.selected ? 'nav:check' : null;
});
var i, length, option;
var renderIcon = false;
for (i = 0, length = options.items.length; i < length; i++) {
var itemsWithIcons = options.items.filter(function (o) {
return o.ironIcon;
});
option = options.items[i];
option.ironIcon = option.selected ? 'nav:check' : null;
if (option.ironIcon) {
renderIcon = true;
}
}
// If any items have an icon, give them all an icon just to make sure they're all lined up evenly
var renderIcon = itemsWithIcons.length;
var center = options.title && (!itemsWithIcons.length /*|| itemsWithIcons.length != options.items.length*/);
var center = options.title && (!renderIcon /*|| itemsWithIcons.length != options.items.length*/);
if (center) {
dlg.classList.add('centered');
@ -150,12 +153,12 @@
var itemTagName = 'paper-button';
for (var i = 0, length = options.items.length; i < length; i++) {
for (i = 0, length = options.items.length; i < length; i++) {
var option = options.items[i];
option = options.items[i];
var autoFocus = option.selected ? ' autoFocus' : '';
html += '<' + itemTagName + autoFocus + ' class="actionSheetMenuItem" data-id="' + option.id + '">';
html += '<' + itemTagName + autoFocus + ' class="actionSheetMenuItem" data-id="' + (option.id || option.value) + '">';
if (option.ironIcon) {
html += '<iron-icon class="actionSheetItemIcon" icon="' + option.ironIcon + '"></iron-icon>';
@ -163,7 +166,7 @@
else if (renderIcon && !center) {
html += '<iron-icon class="actionSheetItemIcon"></iron-icon>';
}
html += '<div class="actionSheetItemText">' + option.name + '</div>';
html += '<div class="actionSheetItemText">' + (option.name || option.textContent || option.innerText) + '</div>';
html += '</' + itemTagName + '>';
}

View file

@ -23,12 +23,12 @@
"spec"
],
"homepage": "https://github.com/Valve/fingerprintjs2",
"version": "1.1.4",
"_release": "1.1.4",
"version": "1.2.0",
"_release": "1.2.0",
"_resolution": {
"type": "version",
"tag": "1.1.4",
"commit": "ae5719db3d942a1a84ab43b707d4d1c34138934e"
"tag": "1.2.0",
"commit": "d5821a481d5c4d4ca348902e3a95b09de2a8702a"
},
"_source": "https://github.com/Valve/fingerprintjs2.git",
"_target": "^1.1.3",

View file

@ -13,7 +13,7 @@ Include in the issue:
* Include library call code (I need all options you used when calling the library function)
## Want to add a feature / contribute?
* Make sure the issue/suggestion does not exist by searching existing issues
* Fork the project and make the required changes in it (don't forget to add specs)
* PRs w/out specs will not be accepted
* Run `gulp` to catch stylistic errors and produce the minified version.

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/*
* Fingerprintjs2 1.1.4 - Modern & flexible browser fingerprint library v2
* Fingerprintjs2 1.2.0 - Modern & flexible browser fingerprint library v2
* https://github.com/Valve/fingerprintjs2
* Copyright (c) 2015 Valentin Vasilyev (valentin.vasilyev@outlook.com)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
@ -334,47 +334,6 @@
// and if it doesn't match all 3 then that font is not available.
var baseFonts = ["monospace", "sans-serif", "serif"];
//we use m or w because these two characters take up the maximum width.
// And we use a LLi so that the same matching fonts can get separated
var testString = "mmmmmmmmmmlli";
//we test using 72px font size, we may use any size. I guess larger the better.
var testSize = "72px";
var h = document.getElementsByTagName("body")[0];
// create a SPAN in the document to get the width of the text we use to test
var s = document.createElement("span");
/*
* We need this css as in some weird browser this
* span elements shows up for a microSec which creates a
* bad user experience
*/
s.style.position = "absolute";
s.style.left = "-9999px";
s.style.fontSize = testSize;
s.innerHTML = testString;
var defaultWidth = {};
var defaultHeight = {};
for (var index = 0, length = baseFonts.length; index < length; index++) {
//get the default width for the three base fonts
s.style.fontFamily = baseFonts[index];
h.appendChild(s);
defaultWidth[baseFonts[index]] = s.offsetWidth; //width for the default font
defaultHeight[baseFonts[index]] = s.offsetHeight; //height for the defualt font
h.removeChild(s);
}
var detect = function (font) {
var detected = false;
for (var index = 0, l = baseFonts.length; index < l; index++) {
s.style.fontFamily = font + "," + baseFonts[index]; // name of the font along with the base font for fallback.
h.appendChild(s);
var matched = (s.offsetWidth !== defaultWidth[baseFonts[index]] || s.offsetHeight !== defaultHeight[baseFonts[index]]);
h.removeChild(s);
detected = detected || matched;
}
return detected;
};
var fontList = [
"Andale Mono", "Arial", "Arial Black", "Arial Hebrew", "Arial MT", "Arial Narrow", "Arial Rounded MT Bold", "Arial Unicode MS",
"Bitstream Vera Sans Mono", "Book Antiqua", "Bookman Old Style",
@ -425,12 +384,116 @@
if(that.options.extendedJsFonts) {
fontList = fontList.concat(extendedFontList);
}
//we use m or w because these two characters take up the maximum width.
// And we use a LLi so that the same matching fonts can get separated
var testString = "mmmmmmmmmmlli";
//we test using 72px font size, we may use any size. I guess larger the better.
var testSize = "72px";
var h = document.getElementsByTagName("body")[0];
// div to load spans for the base fonts
var baseFontsDiv = document.createElement("div");
// div to load spans for the fonts to detect
var fontsDiv = document.createElement("div");
var defaultWidth = {};
var defaultHeight = {};
// creates a span where the fonts will be loaded
var createSpan = function() {
var s = document.createElement("span");
/*
* We need this css as in some weird browser this
* span elements shows up for a microSec which creates a
* bad user experience
*/
s.style.position = "absolute";
s.style.left = "-9999px";
s.style.fontSize = testSize;
s.innerHTML = testString;
return s;
};
// creates a span and load the font to detect and a base font for fallback
var createSpanWithFonts = function(fontToDetect, baseFont) {
var s = createSpan();
s.style.fontFamily = fontToDetect + "," + baseFont;
return s;
};
// creates spans for the base fonts and adds them to baseFontsDiv
var initializeBaseFontsSpans = function() {
var spans = [];
for (var index = 0, length = baseFonts.length; index < length; index++) {
var s = createSpan();
s.style.fontFamily = baseFonts[index];
baseFontsDiv.appendChild(s);
spans.push(s);
}
return spans;
};
// creates spans for the fonts to detect and adds them to fontsDiv
var initializeFontsSpans = function() {
var spans = {};
for(var i = 0, l = fontList.length; i < l; i++) {
var fontSpans = [];
for(var j = 0, numDefaultFonts = baseFonts.length; j < numDefaultFonts; j++) {
var s = createSpanWithFonts(fontList[i], baseFonts[j]);
fontsDiv.appendChild(s);
fontSpans.push(s);
}
spans[fontList[i]] = fontSpans; // Stores {fontName : [spans for that font]}
}
return spans;
};
// checks if a font is available
var isFontAvailable = function(fontSpans) {
var detected = false;
for(var i = 0; i < baseFonts.length; i++) {
detected = (fontSpans[i].offsetWidth !== defaultWidth[baseFonts[i]] || fontSpans[i].offsetHeight !== defaultHeight[baseFonts[i]]);
if(detected) {
return detected;
}
}
return detected;
};
// create spans for base fonts
var baseFontsSpans = initializeBaseFontsSpans();
// add the spans to the DOM
h.appendChild(baseFontsDiv);
// get the default width for the three base fonts
for (var index = 0, length = baseFonts.length; index < length; index++) {
defaultWidth[baseFonts[index]] = baseFontsSpans[index].offsetWidth; // width for the default font
defaultHeight[baseFonts[index]] = baseFontsSpans[index].offsetHeight; // height for the default font
}
// create spans for fonts to detect
var fontsSpans = initializeFontsSpans();
// add all the spans to the DOM
h.appendChild(fontsDiv);
// check available fonts
var available = [];
for (var i = 0, l = fontList.length; i < l; i++) {
if(detect(fontList[i])) {
for(var i = 0, l = fontList.length; i < l; i++) {
if(isFontAvailable(fontsSpans[fontList[i]])) {
available.push(fontList[i]);
}
}
// remove spans from DOM
h.removeChild(fontsDiv);
h.removeChild(baseFontsDiv);
keys.push({key: "js_fonts", value: available});
done(keys);
}, 1);
@ -770,11 +833,12 @@
},
getAdBlock: function(){
var ads = document.createElement("div");
ads.setAttribute("id", "ads");
ads.innerHTML = "&nbsp;";
ads.className = "adsbox";
try {
// body may not exist, that's why we need try/catch
document.body.appendChild(ads);
return document.getElementById("ads") ? false : true;
return document.getElementsByClassName("adsbox")[0].offsetHeight === 0;
} catch (e) {
return false;
}
@ -787,7 +851,7 @@
if(firstLanguages !== navigator.language.substr(0, 2)){
return true;
}
} catch(err){
} catch(err) {
return true;
}
}
@ -1206,6 +1270,6 @@
return ("00000000" + (h1[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (h1[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (h2[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (h2[1] >>> 0).toString(16)).slice(-8);
}
};
Fingerprint2.VERSION = "1.1.4";
Fingerprint2.VERSION = "1.2.0";
return Fingerprint2;
});

View file

@ -1,6 +1,6 @@
{
"name": "fingerprintjs2",
"version": "1.1.4",
"version": "1.2.0",
"description": "Modern & flexible browser fingerprinting library",
"main": "dist/fingerprint2.min.js",
"devDependencies": {