├── LICENSE
├── README.md
├── content
└── main.js
├── manifest.json
├── res
├── icon.png
└── icon.psd
├── script.sh
└── static
├── css
└── style.css
├── img
└── icon.png
└── js
├── common-utils.js
├── jquery-3.6.0.min.js
└── md5.min.js
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Nolovenodie丶
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## 适配Jellyfin
2 | - 感谢Nolovenodie的项目,项目地址:https://github.com/Nolovenodie/emby-crx
3 | - 再此基础上添加无缝轮播,手动点击左右按钮及触控左右滑动切换上下一个。
4 | ## 使用方法
5 | ## 两种方法 只需部署一种即可
6 | # 插件版
7 | ```
8 | 需要用户装载插件
9 | Chrome 扩展设置 > 开发者模式 > 加载已解压的扩展程序 > 直接选择源码即可
10 | ```
11 | ---
12 | # 服务器版
13 | ## 无需使用插件, 直接部署至服务端, 用户无缝使用
14 |
15 | ```
16 | # Docker版 (如遇脚本更新, 重新执行即可)
17 | # 注意: 需要能访问的上Github的环境
18 | # 执行后需要输入容器名!
19 | wget -O script.sh --no-check-certificate https://raw.githubusercontent.com/newday-life/jellyfin-crx/master/script.sh && bash script.sh
20 | ```
21 |
22 | ---
23 |
24 | ### 参考教程1(非官方): https://cangshui.net/5167.html
25 | ### 参考教程2(非官方): https://mj.tk/2023/07/Emby
26 |
--------------------------------------------------------------------------------
/content/main.js:
--------------------------------------------------------------------------------
1 | class Home {
2 | static start() {
3 | this.refreshItem = true;
4 | this.cache = { items: undefined };
5 | this.index = 1;
6 | this.transitionendFlag = false;
7 | this.itemQuery = { ImageTypes: "Backdrop", EnableImageTypes: "Backdrop", IncludeItemTypes: "Movie,Series", SortBy: "ProductionYear, PremiereDate, SortName", Recursive: true, ImageTypeLimit: 1, Limit: 10, Fields: "Overview", SortOrder: "Descending", EnableUserData: false, EnableTotalRecordCount: false };
8 | this.coverOptions = { type: "Backdrop", maxWidth: 3000, adjustForPixelRatio: false };
9 | this.logoOptions = { type: "Logo", maxWidth: 3000, adjustForPixelRatio: false };
10 | this.coverType_L = "Backdrop";//横屏
11 | this.coverType_P = "Primary";//竖屏
12 | this.itemQuery.ImageTypes = this.coverType_L;
13 |
14 | /* 监控节点加载 */
15 | document.addEventListener("viewbeforeshow", function (e) {
16 | if (e.detail.type === "home" || e.target.id === "indexPage") {
17 | //如果高度大于宽度,判断为竖屏
18 | if (innerWidth < innerHeight) {
19 | if (this.coverOptions.type != this.coverType_P) this.coverOptions.type = this.coverType_P;
20 | } else {//横屏
21 | if (this.coverOptions.type != this.coverType_L) this.coverOptions.type = this.coverType_L;
22 | }
23 |
24 | if (!e.detail.isRestored && !e.target.querySelector('.misty-banner')) {
25 | this.initLoading();
26 | const mutation = new MutationObserver(function (mutationRecoards) {
27 | for (let mutationRecoard of mutationRecoards) {
28 | if (mutationRecoard.target.classList.contains("homeSectionsContainer")) {
29 | this.init();
30 | mutation.disconnect();
31 | break;
32 | }
33 | }
34 | }.bind(this));
35 | mutation.observe(document.body, {
36 | childList: true,
37 | characterData: true,
38 | subtree: true,
39 | });
40 | } else {
41 | this.startCarousel();
42 | }
43 | } else {
44 | clearInterval(this.bannerInterval);
45 | }
46 | }.bind(this));
47 | document.addEventListener("visibilitychange", function (e) {
48 | if (e.target.location.hash == "#!/home.html") {
49 | if (e.target.visibilityState == "hidden") {
50 | clearInterval(this.bannerInterval);
51 | } else {
52 | this.startCarousel();
53 | }
54 | }
55 | }.bind(this));
56 | const executeOnce = () => {
57 | //如果高度大于宽度,判断为竖屏
58 | if (innerWidth < innerHeight) {
59 | //如果横竖屏发生切换,变换cover类型
60 | if (this.coverOptions.type != this.coverType_P) {
61 | this.coverOptions.type = this.coverType_P;
62 | $(".misty-banner-item").each(async function (index, element) {
63 | let src = await this.getImageUrl($(element).attr('id'), this.coverOptions);
64 | $(element).children('img').attr('src', src);
65 | }.bind(this));
66 | }
67 |
68 | } else {
69 | // 横屏
70 | if (this.coverOptions.type != this.coverType_L) {
71 | this.coverOptions.type = this.coverType_L;
72 | $(".misty-banner-item").each(async function (index, element) {
73 | let src = await this.getImageUrl($(element).attr('id'), this.coverOptions);
74 | $(element).children('img').attr('src', src);
75 | }.bind(this));
76 | }
77 |
78 | }
79 | };
80 | const debounce = (fn, delay) => {
81 | let timer;
82 | return function () {
83 | if (timer) { clearTimeout(timer); }
84 | timer = setTimeout(() => { fn(); }, delay);
85 | }
86 | };
87 | const cancalDebounce = debounce(executeOnce, 100);
88 | window.addEventListener('resize', cancalDebounce);
89 |
90 | }
91 | static async init() {
92 | $(".homePage:not(.hide)").attr("data-type", "home");
93 | const serverName = await this.injectCall("serverName", "");
94 | $(".misty-loading h1").text(serverName).attr("title", serverName).addClass("active");
95 | await this.initBanner();
96 | this.initEvent();
97 | }
98 |
99 | /* 插入Loading */
100 | static initLoading() {
101 | const load = `
102 |
105 | `;
106 | $("body").append(load);
107 | }
108 | static injectCode(code) {
109 | let hash = md5(code + Math.random().toString());
110 | return new Promise((resolve, reject) => {
111 | if ("BroadcastChannel" in window) {
112 | const channel = new BroadcastChannel(hash);
113 | channel.addEventListener("message", (event) => resolve(event.data));
114 | } else if ("postMessage" in window) {
115 | window.addEventListener("message", (event) => {
116 | if (event.data.channel === hash) {
117 | resolve(event.data.message);
118 | }
119 | });
120 | }
121 | const script = `
122 |
134 | `;
135 | $(document.head || document.documentElement).append(script);
136 | });
137 | }
138 |
139 | static injectCall(func, arg) {
140 | const script = `
141 | const client = await new Promise((resolve, reject) => {
142 | setInterval(() => {
143 | if (window.ApiClient != undefined) resolve(window.ApiClient);
144 | }, 16);
145 | });
146 | return await client.${func}(${arg})
147 | `;
148 | return this.injectCode(script);
149 | }
150 |
151 | static getItems(query) {
152 | if (this.cache.items == undefined) {
153 | this.cache.items = this.injectCall("getItems", "client.getCurrentUserId(), " + JSON.stringify(query));
154 | }
155 | return this.cache.items;
156 | }
157 |
158 | static getImageUrl(itemId, options) {
159 | return this.injectCall("getImageUrl", "'" + itemId + "'" + ", " + JSON.stringify(options));
160 | }
161 | static dynamicSwitchCss() {
162 | // 背景切换
163 | $(".homePage:not(.hide) .misty-banner-body").css({ "left": -(this.index * 100).toString() + "%", transition: "all 1.5s cubic-bezier(0.15, 0.07, 0, 1) 0s" });
164 | // 信息切换
165 | $(".homePage:not(.hide) .misty-banner-info > *").css({ "cssText": "opacity: 0 !important" });
166 | $(".homePage:not(.hide) .misty-banner-info > *").css({
167 | transition: "all 2.5s cubic-bezier(0, 1.41, 0.36, 0.93) .4s",
168 | transform: "translateY(150%)"
169 | });
170 | $(".homePage:not(.hide) .misty-banner-item.active .misty-banner-info > *").css({ "cssText": "opacity: 1 !important" });
171 | $(".homePage:not(.hide) .misty-banner-item.active .misty-banner-info > *").css({ transform: "translateY(0)" });
172 | $(".homePage:not(.hide) .misty-banner-item.active").removeClass("active");
173 | $(".homePage:not(.hide) .misty-banner-info > *").css({ "cssText": "opacity: 0 !important" });
174 | $(".homePage:not(.hide) .misty-banner-info > *").css({
175 | transition: "all 2.5s cubic-bezier(0, 1.41, 0.36, 0.93) .4s",
176 | transform: "translateY(150%)"
177 | });
178 | let id = $(".homePage:not(.hide) .misty-banner-item").eq(this.index).addClass("active").attr("id");
179 | $(".homePage:not(.hide) .misty-banner-item.active .misty-banner-info > *").css({ "cssText": "opacity: 1 !important" });
180 | $(".homePage:not(.hide) .misty-banner-item.active .misty-banner-info > *").css({ transform: "translateY(0)" });
181 | // LOGO切换
182 | $(".homePage:not(.hide) .misty-banner-logo.active").removeClass("active");
183 | $(`.homePage:not(.hide) .misty-banner-logo[id=${id}]`).addClass("active");
184 | }
185 | static staticSwitchCss() {
186 | $(".homePage:not(.hide) .misty-banner-body").css({ "left": -(this.index * 100).toString() + "%", transition: "none" });
187 | $(".homePage:not(.hide) .misty-banner-info > *").css({ "cssText": "opacity: 1 !important" });
188 | $(".homePage:not(.hide) .misty-banner-info > *").css({
189 | transition: "none",
190 | transform: "none",
191 | });
192 | $(".homePage:not(.hide) .misty-banner-item.active").removeClass("active");
193 | let id = $(".homePage:not(.hide) .misty-banner-item").eq(this.index).addClass("active").attr("id");
194 | $(".homePage:not(.hide) .misty-banner-item:not(.active) .misty-banner-info > *").css({ "cssText": "opacity: 0 !important" });
195 | // LOGO切换
196 | $(".homePage:not(.hide) .misty-banner-logo.active").removeClass("active");
197 | $(`.homePage:not(.hide) .misty-banner-logo[id=${id}]`).addClass("active");
198 | }
199 | static backwards() {
200 | this.index -= this.index - 1 == -1 ? -($(".homePage:not(.hide) .misty-banner-item").length - 1) : 1;
201 | this.dynamicSwitchCss();
202 | }
203 | static forwards() {
204 | this.index += this.index + 1 == $(".homePage:not(.hide) .misty-banner-item").length ? -this.index : 1;
205 | this.dynamicSwitchCss();
206 | }
207 |
208 | static transitionListener() {
209 | const runningTransitions = new Set();
210 | $(".homePage:not(.hide) .misty-banner-body").on('transitionstart', function (e) {
211 | runningTransitions.add(e.target);
212 | this.transitionendFlag = false;
213 | }.bind(this));
214 | $(".homePage:not(.hide) .misty-banner-body").on('transitionend', function (e) {
215 | runningTransitions.delete(e.target);
216 | if (runningTransitions.size == 0) {
217 | if (this.transitionendFlag) {
218 | if (this.index >= $(".homePage:not(.hide) .misty-banner-item").length - 1) {
219 | this.index = 1;
220 | this.staticSwitchCss();
221 | }
222 | if (this.index <= 0) {
223 | this.index = $(".homePage:not(.hide) .misty-banner-item").length - 2;
224 | this.staticSwitchCss();
225 | }
226 | }
227 | this.transitionendFlag = true;
228 | }
229 |
230 | }.bind(this));
231 | }
232 | static alertDialog() {
233 | const script = `
234 | Dashboard.alert("太快了,等待动画结束,再切换!");
235 | `;
236 | this.injectCode(script);
237 |
238 | }
239 | static onclickListener(){
240 | $(".homePage:not(.hide) .scrollbuttoncontainer-misty.scrollbuttoncontainer-backwards").on('click', function (e) {
241 | if (this.index != 0 && this.index != $(".homePage:not(.hide) .misty-banner-item").length - 1) {
242 | clearInterval(this.bannerInterval);
243 | this.backwards();
244 | this.startCarousel();
245 | } else {
246 | this.alertDialog();
247 | }
248 | }.bind(this));
249 | $(".homePage:not(.hide) .scrollbuttoncontainer-misty.scrollbuttoncontainer-forwards").on('click', function (e) {
250 | if (this.index != 0 && this.index != $(".homePage:not(.hide) .misty-banner-item").length - 1) {
251 | clearInterval(this.bannerInterval);
252 | this.forwards();
253 | this.startCarousel();
254 | } else {
255 | this.alertDialog();
256 | }
257 | }.bind(this));
258 | }
259 | static touchListener() {
260 | //手指触摸
261 | $(".homePage:not(.hide) .misty-banner-body").on('touchstart', function (e) {
262 | if (this.index != 0 && this.index != $(".homePage:not(.hide) .misty-banner-item").length - 1) {
263 | clearInterval(this.bannerInterval);
264 | this.moveX = 0;
265 | this.startX = e.targetTouches[0].pageX;
266 | this.flag = false;
267 | } else {
268 | this.alertDialog();
269 | }
270 | e.stopPropagation();
271 | }.bind(this));
272 | //手指移动
273 | $(".homePage:not(.hide) .misty-banner-body").on('touchmove', function (e) {
274 | if (this.index != 0 && this.index != $(".homePage:not(.hide) .misty-banner-item").length - 1) {
275 | this.moveX = e.targetTouches[0].pageX - this.startX;
276 | this.flag = true;
277 | $(".homePage:not(.hide) .misty-banner-body").css({ left: -this.index * innerWidth + this.moveX, transition: "none" });
278 | }
279 | e.stopPropagation();
280 | }.bind(this));
281 | //手指离开
282 | $(".homePage:not(.hide) .misty-banner-body").on('touchend', function (e) {
283 | if (this.index != 0 && this.index != $(".homePage:not(.hide) .misty-banner-item").length - 1) {
284 | if (this.flag) {
285 | if (Math.abs(this.moveX) > 50) {
286 | if (this.moveX > 0) {
287 | this.backwards();
288 | } else if (this.moveX < 0) {
289 | this.forwards();
290 | }
291 | } else { //回弹效果
292 | $(".homePage:not(.hide) .misty-banner-body").css({ left: -(this.index * 100).toString() + "%", transition: "none" });
293 | }
294 | }
295 | }
296 | this.startCarousel();
297 | e.stopPropagation();
298 | }.bind(this));
299 | }
300 | static startCarousel() {
301 | clearInterval(this.bannerInterval);
302 | this.bannerInterval = setInterval(() => {
303 | this.forwards();
304 | }, 8000);
305 | }
306 |
307 | /* 插入Banner */
308 | static async initBanner() {
309 | const banner = `
310 |
311 |
323 |
324 |
325 |
326 |
329 |
330 | `;
331 | $(".homePage:not(.hide) .homeSectionsContainer").prepend(banner);
332 |
333 | // 插入数据
334 | this.data = await this.getItems(this.itemQuery);
335 | if (this.data.Items.length == 0) {
336 | $(".misty-loading").fadeOut(500, () => $(".misty-loading").remove());
337 | return;
338 | }
339 | for(let detail of this.data.Items) {
340 | const itemHtml = `
341 |
342 |
})
343 |
344 |
${detail.Name}
345 |
346 |
347 |
348 |
349 | `;
350 |
351 | if (detail.ImageTags && detail.ImageTags.Logo) {
352 | const logoHtml = `
353 |
354 | `;
355 | $(".homePage:not(.hide) .misty-banner-logos").append(logoHtml);
356 | }
357 | $(".homePage:not(.hide) .misty-banner-body").append(itemHtml);
358 | };
359 | // 只判断第一张海报加载完毕, 优化加载速度
360 | await new Promise((resolve, reject) => {
361 | let waitLoading = setInterval(() => {
362 | if (document.querySelector(".homePage:not(.hide) .misty-banner-cover")?.complete && (document.querySelector(".layout-mobile") || document.querySelector(".layout-tv") || document.querySelector(".homePage:not(.hide) .section0 .emby-scrollbuttons"))) {
363 | clearInterval(waitLoading);
364 | resolve();
365 | }
366 | }, 16);
367 | });
368 |
369 | let firstitem = $(".homePage:not(.hide) .misty-banner-item").first().clone();
370 | let lastitem = $(".homePage:not(.hide) .misty-banner-item").last().clone();
371 | $(".homePage:not(.hide) .misty-banner-body").append(firstitem);
372 | $(".homePage:not(.hide) .misty-banner-body").prepend(lastitem);
373 |
374 | // 分离section0元素移动到misty-banner-library内
375 | $('.homePage:not(.hide) .section0 .emby-scrollbuttons').remove();
376 | $(".homePage:not(.hide) .section0").detach().appendTo(".homePage:not(.hide) .misty-banner-library");
377 |
378 | $(".misty-loading").fadeOut(500, () => $(".misty-loading").remove());
379 | await CommonUtils.sleep(150);
380 | // 置入场动画
381 | this.transitionListener();
382 | let delay = 80; // 动媒体库画间隔
383 | let id = $(".homePage:not(.hide) .misty-banner-item").eq(1).addClass("active").attr("id"); // 初次信息动画
384 | $(`.homePage:not(.hide) .misty-banner-logo[id=${id}]`).addClass("active");
385 |
386 | await CommonUtils.sleep(200); // 间隔动画
387 | $(".homePage:not(.hide) .section0 > div").addClass("misty-banner-library-overflow"); // 关闭overflow 防止媒体库动画溢出
388 | $(".homePage:not(.hide) .section0 .card").each((i, dom) => setTimeout(() => $(dom).addClass("misty-banner-library-show"), i * delay)); // 媒体库动画
389 | await CommonUtils.sleep(delay * 8 + 1000); // 等待媒体库动画完毕
390 | $(".homePage:not(.hide) .section0 > div").removeClass("misty-banner-library-overflow"); // 开启overflow 防止无法滚动
391 | // 滚屏逻辑
392 | this.index = 1;
393 | this.startCarousel();
394 | }
395 |
396 | /* 初始事件 */
397 | static async initEvent() {
398 | this.touchListener();
399 | this.onclickListener();
400 | }
401 | }
402 |
403 | // 运行
404 | if ("BroadcastChannel" in window || "postMessage" in window) {
405 | if ($("meta[name=application-name]").attr("content") == "Jellyfin") {
406 | Home.start();
407 | }
408 | }
409 |
--------------------------------------------------------------------------------
/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "manifest_version": 2,
3 | "name": "Jellyfin Tools.",
4 | "version": "1.0.5",
5 | "description": "Misty Jellyfin Tools.",
6 | "author": "original author:Nolovenodie",
7 | "homepage_url": "https://ssky.me",
8 | "icons": {
9 | "16": "static/img/icon.png",
10 | "19": "static/img/icon.png",
11 | "38": "static/img/icon.png",
12 | "48": "static/img/icon.png",
13 | "128": "static/img/icon.png"
14 | },
15 | "browser_action": {
16 | "default_icon": "static/img/icon.png",
17 | "default_title": "Misty Tools."
18 | },
19 | "content_scripts": [
20 | {
21 | "matches": [""],
22 | "css": ["static/css/style.css"],
23 | "js": ["static/js/jquery-3.6.0.min.js", "static/js/common-utils.js", "static/js/md5.min.js", "content/main.js"],
24 | "run_at": "document_end"
25 | }
26 | ],
27 | "permissions": ["http://*/*", "https://*/*", ""]
28 | }
29 |
--------------------------------------------------------------------------------
/res/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newday-life/jellyfin-crx/e930289830c24e5fe35d29d47905a7bc83f65859/res/icon.png
--------------------------------------------------------------------------------
/res/icon.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newday-life/jellyfin-crx/e930289830c24e5fe35d29d47905a7bc83f65859/res/icon.psd
--------------------------------------------------------------------------------
/script.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | read -p "请输入 Jellyfin 容器名称:" name
4 | echo "程序安装中...(如长时间未响应或下载失败,请检查网络是否能连接Github)"
5 |
6 | # 在容器内创建文件夹
7 | docker exec -it $name rm -rf /jellyfin/jellyfin-web/jellyfin-crx/
8 | docker exec -it $name mkdir -p /jellyfin/jellyfin-web/jellyfin-crx/
9 |
10 | # 下载所需文件到系统
11 | echo "正在下载缓存文件,请稍等... ..."
12 | wget -q --no-check-certificate https://raw.githubusercontent.com/newday-life/jellyfin-crx/master/static/css/style.css -O style.css || { echo "错误:无法下载"; exit 1; }
13 | wget -q --no-check-certificate https://raw.githubusercontent.com/newday-life/jellyfin-crx/master/static/js/common-utils.js -O common-utils.js || { echo "错误:无法下载"; exit 1; }
14 | wget -q --no-check-certificate https://raw.githubusercontent.com/newday-life/jellyfin-crx/master/static/js/jquery-3.6.0.min.js -O jquery-3.6.0.min.js || { echo "错误:无法下载"; exit 1; }
15 | wget -q --no-check-certificate https://raw.githubusercontent.com/newday-life/jellyfin-crx/master/static/js/md5.min.js -O md5.min.js || { echo "错误:无法下载"; exit 1; }
16 | wget -q --no-check-certificate https://raw.githubusercontent.com/newday-life/jellyfin-crx/master/content/main.js -O main.js || { echo "错误:无法下载"; exit 1; }
17 |
18 | # 从系统复制文件到容器内
19 | docker cp style.css $name:/jellyfin/jellyfin-web/jellyfin-crx/
20 | docker cp common-utils.js $name:/jellyfin/jellyfin-web/jellyfin-crx/
21 | docker cp jquery-3.6.0.min.js $name:/jellyfin/jellyfin-web/jellyfin-crx/
22 | docker cp md5.min.js $name:/jellyfin/jellyfin-web/jellyfin-crx/
23 | docker cp main.js $name:/jellyfin/jellyfin-web/jellyfin-crx/
24 |
25 | # 定义安装程序
26 | function Installing() {
27 | # 读取index.html文件内容
28 | content=$(cat index.html)
29 |
30 | # 定义要插入的代码
31 | code='\n\n\n\n'
32 |
33 | # 在之前插入代码
34 | new_content=$(echo -e "${content/<\/head>/$code<\/head>}")
35 |
36 | # 将新内容写入index.html文件
37 | echo -e "$new_content" > index.html
38 | # 覆盖容器内取index.html文件
39 | docker cp ./index.html $name:/jellyfin/jellyfin-web/
40 | }
41 |
42 | # 先复制一份到系统内
43 | docker cp $name:/jellyfin/jellyfin-web/index.html ./
44 |
45 | # 检查index.html是否包含jellyfin-crx
46 | if grep -q "jellyfin-crx" index.html; then
47 | docker cp $name:/jellyfin/jellyfin-web/bak/index.html ./
48 | Installing
49 | echo "成功!Index.html 已重新修改!"
50 | else
51 | docker cp $name:/jellyfin/jellyfin-web/index.html ./
52 | # 备份
53 | docker exec -it $name mkdir -p /jellyfin/jellyfin-web/bak/
54 | docker cp ./index.html $name:/jellyfin/jellyfin-web/bak/
55 | Installing
56 | echo "成功!Index.html 首次安装!"
57 | fi
58 |
--------------------------------------------------------------------------------
/static/css/style.css:
--------------------------------------------------------------------------------
1 | @media (min-width: 50em) {
2 | .layout-desktop .homePage .section0 .padded-top-focusscale.padded-bottom-focusscale.emby-scroller {
3 | overflow: visible !important;
4 | }
5 | }
6 |
7 | .homePage .scrollbuttoncontainer-backwards {
8 | left: 0;
9 | inset-inline-start: 0;
10 | inset-inline-end: initial;
11 | }
12 |
13 | .homePage .scrollbuttoncontainer-forwards {
14 | right: 0;
15 | inset-inline-start: initial;
16 | inset-inline-end: 0;
17 | }
18 |
19 | .homePage .paper-icon-button-light>i {
20 | font-size: 4em !important;
21 | height: 1.25em;
22 | width: 1.25em;
23 | display: flex;
24 | justify-content: center;
25 | align-items: center;
26 | }
27 |
28 | .homePage .paper-icon-button-light:enabled {
29 | cursor: pointer;
30 | }
31 |
32 | @media (hover: hover) and (pointer: fine) {
33 | .homePage .emby-scrollbuttons-scrollbutton {
34 | transition: -webkit-transform 180ms ease-out;
35 | transition: transform 180ms ease-out;
36 | }
37 | }
38 |
39 | .homePage .paper-icon-button-light {
40 | position: relative;
41 | display: -webkit-inline-flex;
42 | display: inline-flex;
43 | -webkit-align-items: center;
44 | align-items: center;
45 | box-sizing: border-box;
46 | margin: 0 .29em;
47 | background: 0 0;
48 | text-align: center;
49 | font-size: inherit;
50 | font-family: inherit;
51 | color: inherit;
52 | -webkit-user-select: none;
53 | user-select: none;
54 | z-index: 0;
55 | min-width: initial;
56 | min-height: initial;
57 | width: auto;
58 | height: auto;
59 | padding: .556em;
60 | vertical-align: middle;
61 | border: 0;
62 | vertical-align: middle;
63 | position: relative;
64 | overflow: hidden;
65 | border-radius: 50%;
66 | -webkit-tap-highlight-color: transparent;
67 | -webkit-justify-content: center;
68 | justify-content: center;
69 | outline: 0 !important;
70 | text-shadow: inherit;
71 | }
72 |
73 | .homePage .section0 .emby-scrollbuttons {
74 | top: -4em;
75 | }
76 |
77 | .skinHeader.focuscontainer-x.skinHeader-withBackground {
78 | background: linear-gradient(rgba(0, 0, 0, .5), transparent) !important;
79 | }
80 |
81 | div#homeTab {
82 | top: -7.5em;
83 | position: relative;
84 | }
85 |
86 | .homePage:not(.hide) .scrollbuttoncontainer {
87 | background: transparent !important;
88 | }
89 |
90 | button.emby-scrollbuttons-scrollbutton.paper-icon-button-light {
91 | -webkit-box-shadow: 0px 0px 15px 0px rgb(0 0 0 / 99%) !important;
92 | -moz-box-shadow: 0px 0px 15px 0px rgb(0 0 0 / 99%) !important;
93 | box-shadow: 0px 0px 15px 0px rgb(0 0 0 / 99%) !important;
94 | -webkit-backdrop-filter: blur(0.5em) saturate(0.5) !important;
95 | backdrop-filter: blur(0.5em) saturate(0.5) !important;
96 | margin: 0 30px 0;
97 | transform: scale(.85) !important;
98 | background: #ffffff30;
99 | border-radius: 50% !important;
100 | }
101 |
102 | .emby-scrollbuttons.emby-scrollbuttons-misty {
103 | position: absolute;
104 | z-index: 99999999999 !important;
105 | height: 100px;
106 | width: 100%;
107 | align-items: center;
108 | top: 50%;
109 | transform: translateY(-50%);
110 | }
111 |
112 | .scrollbuttoncontainer-misty {
113 | position: absolute;
114 | display: flex;
115 | opacity: 0;
116 | }
117 |
118 | .scrollbuttoncontainer-misty.scrollbuttoncontainer-backwards:hover,
119 | .scrollbuttoncontainer-misty.scrollbuttoncontainer-forwards:hover {
120 | opacity: 1 !important;
121 | }
122 |
123 | @media (min-width: 50em) {
124 | .misty-banner-item {
125 | min-height: 75vh;
126 | }
127 | }
128 |
129 | @media not all and (min-width: 50em) {
130 | .misty-banner-cover {
131 | min-height: 142.328vw;
132 | }
133 |
134 | div.misty-loading h1 {
135 | font-size: 2em;
136 | }
137 |
138 | div.misty-banner-info {
139 | margin-top: 10vh;
140 | }
141 |
142 | .misty-banner-logos {
143 | margin-bottom: 2rem;
144 | }
145 | }
146 |
147 | ::-webkit-scrollbar {
148 | width: .3em !important;
149 | }
150 |
151 | .mdl-spinner {
152 | zoom: .5;
153 | }
154 |
155 | .skinHeader-withBackground {
156 | right: 0 !important;
157 | background-image: linear-gradient(rgba(0, 0, 0, .5), transparent)!important;
158 | background-color: unset;
159 | }
160 |
161 | .homePage:not(.hide) .section0 {
162 | z-index: 2;
163 | }
164 |
165 | .homePage:not(.hide) .section0 .cardText {
166 | position: absolute;
167 | top: 0;
168 | display: none;
169 | /* 如果不需要媒体库标题显示, 请将flex改为none */
170 | width: 100%;
171 | height: 100%;
172 | padding: 0 !important;
173 | background-color: rgba(0, 0, 0, .5);
174 | font-weight: bolder;
175 | font-size: larger;
176 | border-radius: var(--cardbox-radius);
177 | transition: .2s;
178 | opacity: 0;
179 | }
180 |
181 | .homePage:not(.hide) .section0 .card:hover .cardText {
182 | opacity: 1;
183 | }
184 |
185 | .homePage:not(.hide) .section0 .cardText button {
186 | text-decoration: none;
187 | }
188 |
189 | .homePage:not(.hide) .section0 .cardOverlayContainer {
190 | background: none;
191 | }
192 |
193 | .homePage:not(.hide) .section0 .cardOverlayContainer label,
194 | .homePage:not(.hide) .section0 .sectionTitleContainer,
195 | .homePage:not(.hide) .section0 .sectionTitle {
196 | display: none !important;
197 | }
198 |
199 | .homePage:not(.hide) .section0 .cardBox-touchzoom {
200 | box-shadow: 0 8px 10px rgb(0 0 0 / 15%);
201 | }
202 |
203 | .homePage:not(.hide) .section0 .card {
204 | transition: all 1.5s cubic-bezier(0, 1.75, .25, 1) 0s;
205 | }
206 |
207 | .homePage:not(.hide) .section0 .card:hover {
208 | transform: scale(1.1) !important;
209 | }
210 |
211 | .misty-banner {
212 | position: relative;
213 | overflow: hidden;
214 | }
215 |
216 | .misty-banner-cover {
217 | width: 100%;
218 | max-height: 100vh;
219 | user-select: none;
220 | object-fit: cover;
221 | object-position: top;
222 | -webkit-mask-image: linear-gradient(to top, transparent 0%, black 30%);
223 | mask-image: linear-gradient(to top, transparent 0%, black 30%);
224 | }
225 |
226 | .misty-banner-logo {
227 | position: absolute;
228 | user-select: none;
229 | object-fit: contain;
230 | height: clamp(3rem, -2.182rem + 10.91vw, 6rem);
231 | /* width: fit-content; */
232 | transform: translateY(calc(-50% - clamp(-2rem, -3.455rem + 7.27vw, 2rem)));
233 | right: calc(3.4% + min(0.72em, max(0.48em, 1.78vw)));
234 | opacity: 0;
235 | transition: 1s;
236 | transition-delay: .8s;
237 | }
238 |
239 | .misty-banner-logo.active {
240 | transform: translateY(calc(-100% - clamp(-2rem, -3.455rem + 7.27vw, 2rem)));
241 | opacity: 1;
242 | }
243 |
244 | .misty-loading {
245 | z-index: 99999999;
246 | position: fixed;
247 | top: 0;
248 | left: 0;
249 | width: 100%;
250 | height: 100%;
251 | background-color: rgba(0, 0, 0, 1);
252 | display: flex;
253 | align-items: center;
254 | justify-content: center;
255 | flex-direction: column;
256 | }
257 |
258 | .misty-loading h1 {
259 | margin: 0;
260 | margin-bottom: 3rem;
261 | text-transform: uppercase;
262 | transition: .8s;
263 | transform: scale(1.15);
264 | opacity: 0;
265 | font-size: 4em;
266 | }
267 |
268 | .misty-loading h1.active {
269 | transform: scale(1);
270 | opacity: 1;
271 | }
272 |
273 | .misty-loading .mdl-spinner {
274 | margin: 0;
275 | position: initial;
276 | }
277 |
278 | .misty-loading .mdl-spinner__layer-1 {
279 | border-color: #fff;
280 | }
281 |
282 | .misty-banner-library {
283 | position: absolute;
284 | width: 100%;
285 | height: 100%;
286 | top: 0;
287 | padding: clamp(0rem, -1.313rem + 3.75vw, 1.5rem) 0;
288 | box-sizing: border-box;
289 | display: flex;
290 | justify-content: flex-end;
291 | flex-direction: column;
292 | /* background-image: linear-gradient(90deg, rgba(0, 0, 0, .6), transparent); */
293 |
294 | }
295 |
296 | .misty-banner-mask {
297 | position: absolute;
298 | width: 100%;
299 | height: 100%;
300 | top: 0;
301 | background-image: linear-gradient(90deg, rgba(0, 0, 0, .6), transparent);
302 | -webkit-mask-image: linear-gradient(to top, transparent 0%, black 10%);
303 | mask-image: linear-gradient(to top, transparent 0%, black 10%);
304 | }
305 |
306 | .misty-banner-body {
307 | display: flex;
308 | position: relative;
309 | left: -100%;
310 | transition: all 1.5s cubic-bezier(0.15, 0.07, 0, 1) 0s;
311 | }
312 |
313 | .misty-banner-item {
314 | min-width: 100%;
315 | }
316 |
317 | .misty-banner-info {
318 | width: 100%;
319 | margin: min(.72em, max(.48em, 1.78vw));
320 | margin-top: 0;
321 | position: absolute;
322 | top: 0;
323 | z-index: 1;
324 | height: 100%;
325 | display: flex;
326 | flex-direction: column;
327 | justify-content: center
328 | }
329 |
330 | .misty-banner-info>* {
331 | transition: all 2.5s cubic-bezier(0, 1.41, 0.36, 0.93) .4s;
332 | transform: translateY(150%);
333 | opacity: 0 !important;
334 | }
335 |
336 | .misty-banner-item.active .misty-banner-info>* {
337 | transform: translateY(0);
338 | opacity: 1 !important;
339 | }
340 |
341 | .misty-banner-info>div:nth-child(2) {
342 | transition-delay: .6s;
343 | }
344 |
345 | .misty-banner-info>div:nth-child(3) {
346 | transition-delay: .8s;
347 | }
348 |
349 | .misty-banner-info h1 {
350 | color: #fff !important;
351 | font-size: clamp(2rem, -.362rem + 6.75vw, 4.7rem);
352 | font-weight: bolder;
353 | margin: 0;
354 | text-shadow: 0 4px 10px rgb(0 0 0 / 20%);
355 | /* margin-bottom: clamp(0rem, -.545rem + 2.73vw, 1.5rem); */
356 | max-width: 50%;
357 | display: -webkit-box !important;
358 | -webkit-box-orient: vertical;
359 | -webkit-line-clamp: 1;
360 | overflow: hidden;
361 | }
362 |
363 | .misty-banner-info p {
364 | color: #fff !important;
365 | font-size: clamp(1rem, .4rem + 1vw, 1.6rem);
366 | font-weight: bold;
367 | max-width: 47%;
368 | opacity: .7;
369 | /* overflow: hidden;
370 | white-space: nowrap;
371 | text-overflow: ellipsis; */
372 | display: -webkit-box !important;
373 | -webkit-box-orient: vertical;
374 | -webkit-line-clamp: 2;
375 | overflow: hidden;
376 | }
377 |
378 | .misty-banner-info button {
379 | cursor: pointer;
380 | margin-top: clamp(0rem, -2.625rem + 7.5vw, 3rem);
381 | width: 6em;
382 | height: 1.8em;
383 | background-color: #fff;
384 | border: none;
385 | font-size: clamp(1rem, -.275rem + 2.5vw, 1.6rem);
386 | border-radius: 10px;
387 | font-weight: bold;
388 | letter-spacing: 2px;
389 | box-shadow: 0 2px 7px rgba(1, 1, 1, -.8);
390 | font-family: system-ui;
391 | transition: .2s;
392 | margin-right: 1rem;
393 | }
394 |
395 | .misty-banner-info button:hover {
396 | transform: scale(.95);
397 | }
398 |
399 | @media screen and (max-width: 62.5em) {
400 | .misty-banner-info button {
401 | margin-top: 0;
402 | }
403 | }
404 |
405 | /*
406 | @media screen and (max-width: 52em) {
407 |
408 | .misty-banner-info button,
409 | .misty-banner-info p {
410 | display: none;
411 | }
412 | }
413 |
414 | @media screen and (max-width: 35em) {
415 |
416 | .misty-banner-info,
417 | .misty-banner-logo {
418 | display: none !important;
419 | }
420 |
421 | .misty-banner-body {
422 | opacity: 0;
423 | }
424 | } */
425 |
426 | .misty-banner .card {
427 | transition-duration: 0;
428 | transform: translateY(80%);
429 | opacity: 0;
430 | }
431 |
432 | .misty-banner-library-show {
433 | transition-duration: 1.7s !important;
434 | transform: translateY(0) !important;
435 | opacity: 1 !important;
436 | }
437 |
438 | .misty-banner-library-overflow {
439 | overflow: visible !important;
440 | }
441 |
--------------------------------------------------------------------------------
/static/img/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newday-life/jellyfin-crx/e930289830c24e5fe35d29d47905a7bc83f65859/static/img/icon.png
--------------------------------------------------------------------------------
/static/js/common-utils.js:
--------------------------------------------------------------------------------
1 | class CommonUtils {
2 | static selectWait(selector, func, times, interval) {
3 | var _times = times || 100, //100次
4 | _interval = interval || 500, //20毫秒每次
5 | _jquery = null,
6 | _iIntervalID;
7 |
8 | _iIntervalID = setInterval(() => {
9 | if (!_times) {
10 | clearInterval(_iIntervalID);
11 | }
12 | _times <= 0 || _times--;
13 | _jquery = $(selector);
14 | if (_jquery.length) {
15 | func && func.call(func);
16 | clearInterval(_iIntervalID);
17 | }
18 | }, _interval);
19 | return this;
20 | }
21 |
22 | static selectNotWait(selector, func, interval) {
23 | let _jquery,
24 | _interval = interval || 20,
25 | _iIntervalID;
26 |
27 | _iIntervalID = setInterval(() => {
28 | _jquery = $(selector);
29 | if (_jquery.length < 1) {
30 | func && func.call(func);
31 | clearInterval(_iIntervalID);
32 | }
33 | }, _interval);
34 | }
35 |
36 | static copyText(value, cb) {
37 | const textarea = document.createElement("textarea");
38 | textarea.readOnly = "readonly";
39 | textarea.style.position = "absolute";
40 | textarea.style.left = "-9999px";
41 | textarea.value = value;
42 | document.body.appendChild(textarea);
43 | textarea.select();
44 | textarea.setSelectionRange(0, textarea.value.length);
45 | document.execCommand("Copy");
46 | document.body.removeChild(textarea);
47 | if (cb && Object.prototype.toString.call(cb) === "[object Function]") {
48 | cb();
49 | }
50 | }
51 |
52 | /**
53 | * 休眠
54 | * @param {number} ms 休眠多少毫秒
55 | */
56 | static sleep(ms) {
57 | return new Promise((resolve, reject) => {
58 | setTimeout(() => {
59 | resolve("完成");
60 | }, ms);
61 | });
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/static/js/jquery-3.6.0.min.js:
--------------------------------------------------------------------------------
1 | /*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
2 | !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0>>(32-b))}function c(a,b){var c,d,e,f,g;return(e=2147483648&a),(f=2147483648&b),(c=1073741824&a),(d=1073741824&b),(g=(1073741823&a)+(1073741823&b)),c&d?2147483648^g^e^f:c|d?(1073741824&g?3221225472^g^e^f:1073741824^g^e^f):g^e^f}function d(a,b,c){return(a&b)|(~a&c)}function e(a,b,c){return(a&c)|(b&~c)}function f(a,b,c){return a^b^c}function g(a,b,c){return b^(a|~c)}function h(a,e,f,g,h,i,j){return(a=c(a,c(c(d(e,f,g),h),j))),c(b(a,i),e)}function i(a,d,f,g,h,i,j){return(a=c(a,c(c(e(d,f,g),h),j))),c(b(a,i),d)}function j(a,d,e,g,h,i,j){return(a=c(a,c(c(f(d,e,g),h),j))),c(b(a,i),d)}function k(a,d,e,f,h,i,j){return(a=c(a,c(c(g(d,e,f),h),j))),c(b(a,i),d)}function l(a){for(var b,c=a.length,d=c+8,e=(d-(d%64))/64,f=16*(e+1),g=new Array(f-1),h=0,i=0;c>i;)(b=(i-(i%4))/4),(h=(i%4)*8),(g[b]=g[b]|(a.charCodeAt(i)<>>29),g}function m(a){var b,c,d="",e="";for(c=0;3>=c;c++)(b=(a>>>(8*c))&255),(e="0"+b.toString(16)),(d+=e.substr(e.length-2,2));return d}function n(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;cd?(b+=String.fromCharCode(d)):d>127&&2048>d?((b+=String.fromCharCode((d>>6)|192)),(b+=String.fromCharCode((63&d)|128))):((b+=String.fromCharCode((d>>12)|224)),(b+=String.fromCharCode(((d>>6)&63)|128)),(b+=String.fromCharCode((63&d)|128)))}return b}var o,p,q,r,s,t,u,v,w,x=[],y=7,z=12,A=17,B=22,C=5,D=9,E=14,F=20,G=4,H=11,I=16,J=23,K=6,L=10,M=15,N=21;for(a=n(a),x=l(a),t=1732584193,u=4023233417,v=2562383102,w=271733878,o=0;o