├── 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 | # Emby Crx 2 | 3 | _Emby 增强/美化 插件 (适用于 Chrome 内核浏览器)_ 4 | 5 | # 警告: 媒体库封面为原创设计, 未经授权请勿模仿使用! 6 | 7 | --- 8 | 9 | ## 动画预览 (因 LOGO 入场动画过于优先, 效果可能略差, 最新版已更改, 视频等待更新, 具体效果可以自行尝试) 10 | 11 | https://user-images.githubusercontent.com/18238152/235517763-5ee7fe21-87e7-414f-a1cd-b2c6fadbb8d5.mp4 12 | 13 | ## 使用须知 14 | 15 | 如不需要 媒体库 鼠标悬浮 后居中显示库名, 请更改 static\css\style.css 文件内 第 37 行 16 | 17 | ## 使用方法 18 | 19 | **两种方法 只需部署一种即可** 20 | 21 | > 插件版 22 | 23 | _需要用户装载插件_ 24 | 25 | Chrome 扩展设置 > 开发者模式 > 加载已解压的扩展程序 > 直接选择源码即可 26 | 27 | > 服务器版 28 | 29 | _无需使用插件, 直接部署至服务端, 用户无缝使用_ 30 | 31 | # Docker 版 (如遇脚本更新, 重新执行即可) 32 | # 注意: 需要能访问的上Github的环境, 如果不懂 请在群内@我留言 33 | # EmbyServer 为容器名, 如果你的容器名不是这个 请改成正确的! 34 | # 参考教程(非官方): https://mj.tk/2023/07/Emby 35 | docker exec EmbyServer /bin/sh -c 'cd /system/dashboard-ui && wget -O - https://tinyurl.com/2p97xcpd | sh' 36 | 37 | # 正常版 38 | # 参考教程(非官方): https://cangshui.net/5167.html 39 | 40 | --- 41 | 42 | ## TODO 43 | 44 | - 封装为单 JS/CSS, 供客户端使用 45 | - 内封装进 Misty Media 客户端 46 | - 播放跳转第三方播放器功能 47 | - 版本在线检测更新 48 | 49 | --- 50 | 51 | ## 效果预览 52 | 53 | # 警告: 媒体库封面为原创设计, 未经授权请勿模仿使用! 54 | 55 | ![1](https://user-images.githubusercontent.com/18238152/235510774-666d9006-cbad-4b97-9a73-ad5334cb7eee.png) ![2](https://user-images.githubusercontent.com/18238152/235510867-4b71a870-6be6-46a5-b988-527d667b020d.png) ![3](https://user-images.githubusercontent.com/18238152/235510872-ef88ae87-6693-4c11-b7ad-0f05e1a5c583.png) ![4](https://user-images.githubusercontent.com/18238152/235510874-f2fe4715-eb68-4f7a-ac49-50dc5f4ef5aa.png) 56 | -------------------------------------------------------------------------------- /content/main.js: -------------------------------------------------------------------------------- 1 | class Home { 2 | static start() { 3 | this.cache = { 4 | items: undefined, 5 | item: new Map(), 6 | }; 7 | this.itemQuery = { ImageTypes: "Backdrop", EnableImageTypes: "Logo,Backdrop", IncludeItemTypes: "Movie,Series", SortBy: "ProductionYear, PremiereDate, SortName", Recursive: true, ImageTypeLimit: 1, Limit: 10, Fields: "ProductionYear", SortOrder: "Descending", EnableUserData: false, EnableTotalRecordCount: false }; 8 | this.coverOptions = { type: "Backdrop", maxWidth: 3000 }; 9 | this.logoOptions = { type: "Logo", maxWidth: 3000 }; 10 | this.initStart = false; 11 | setInterval(() => { 12 | if (window.location.href.indexOf("!/home") != -1) { 13 | if ($(".view:not(.hide) .misty-banner").length == 0 && $(".misty-loading").length == 0) { 14 | this.initStart = false; 15 | this.initLoading(); 16 | } 17 | if ($(".hide .misty-banner").length != 0) { 18 | $(".hide .misty-banner").remove(); 19 | } 20 | if (!this.initStart && $(".section0 .card").length != 0 && $(".view:not(.hide) .misty-banner").length == 0) { 21 | this.initStart = true; 22 | this.init(); 23 | } 24 | } 25 | }, 100); 26 | } 27 | 28 | static async init() { 29 | // Beta 30 | $(".view:not(.hide)").attr("data-type", "home"); 31 | // Loading 32 | const serverName = await this.injectCall("serverName", ""); 33 | $(".misty-loading h1").text(serverName).addClass("active"); 34 | // Banner 35 | await this.initBanner(); 36 | this.initEvent(); 37 | } 38 | 39 | /* 插入Loading */ 40 | static initLoading() { 41 | const load = ` 42 |
43 |

44 |
45 |
46 | `; 47 | $("body").append(load); 48 | } 49 | 50 | static injectCode(code) { 51 | let hash = md5(code + Math.random().toString()); 52 | return new Promise((resolve, reject) => { 53 | if ("BroadcastChannel" in window) { 54 | const channel = new BroadcastChannel(hash); 55 | channel.addEventListener("message", (event) => resolve(event.data)); 56 | } else if ("postMessage" in window) { 57 | window.addEventListener("message", (event) => { 58 | if (event.data.channel === hash) { 59 | resolve(event.data.message); 60 | } 61 | }); 62 | } 63 | const script = ` 64 | 76 | `; 77 | $(document.head || document.documentElement).append(script); 78 | }); 79 | } 80 | 81 | static injectCall(func, arg) { 82 | const script = ` 83 | // const client = (await window.require(["ApiClient"]))[0]; 84 | const client = await new Promise((resolve, reject) => { 85 | setInterval(() => { 86 | if (window.ApiClient != undefined) resolve(window.ApiClient); 87 | }, 16); 88 | }); 89 | return await client.${func}(${arg}) 90 | `; 91 | return this.injectCode(script); 92 | } 93 | 94 | static getItems(query) { 95 | if (this.cache.items == undefined) { 96 | this.cache.items = this.injectCall("getItems", "client.getCurrentUserId(), " + JSON.stringify(query)); 97 | } 98 | return this.cache.items; 99 | } 100 | 101 | static async getItem(itemId) { 102 | // 双缓存 优先使用 WebStorage 103 | if (typeof Storage !== "undefined" && !localStorage.getItem("CACHE|" + itemId) && !this.cache.item.has(itemId)) { 104 | const data = JSON.stringify(await this.injectCall("getItem", `client.getCurrentUserId(), "${itemId}"`)); 105 | if (typeof Storage !== "undefined") localStorage.setItem("CACHE|" + itemId, data); 106 | else this.cache.item.set(itemId, data); 107 | } 108 | return JSON.parse(typeof Storage !== "undefined" ? localStorage.getItem("CACHE|" + itemId) : this.cache.item.get(itemId)); 109 | } 110 | 111 | static getImageUrl(itemId, options) { 112 | return this.injectCall("getImageUrl", itemId + ", " + JSON.stringify(options)); 113 | } 114 | 115 | /* 插入Banner */ 116 | static async initBanner() { 117 | const banner = ` 118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 | `; 126 | $(".view:not(.hide) .homeSectionsContainer").prepend(banner); 127 | const items = $(".view:not(.hide) .section0 .emby-scroller .itemsContainer")[0].items; 128 | $(".view:not(.hide) .section0").detach().appendTo(".view:not(.hide) .misty-banner-library"); 129 | $(".view:not(.hide) .section0 .emby-scroller .itemsContainer")[0].items = items; 130 | 131 | // 插入数据 132 | const data = await this.getItems(this.itemQuery); 133 | console.log(data); 134 | data.Items.forEach(async (item) => { 135 | const detail = await this.getItem(item.Id), 136 | itemHtml = ` 137 |
138 | Backdrop 139 |
140 |

${detail.Name}

141 |

${detail.Overview}

142 |
143 |
144 |
145 | `, 146 | logoHtml = ` 147 | 148 | `; 149 | if (detail.ImageTags && detail.ImageTags.Logo) { 150 | $(".misty-banner-logos").append(logoHtml); 151 | } 152 | $(".misty-banner-body").append(itemHtml); 153 | console.log(item.Id, detail); 154 | }); 155 | 156 | // 只判断第一张海报加载完毕, 优化加载速度 157 | await new Promise((resolve, reject) => { 158 | let waitLoading = setInterval(() => { 159 | if (document.querySelector(".misty-banner-cover").complete) { 160 | clearInterval(waitLoading); 161 | resolve(); 162 | } 163 | }, 16); 164 | }); 165 | 166 | $(".misty-loading").fadeOut(500, () => $(".misty-loading").remove()); 167 | await CommonUtils.sleep(150); 168 | // 置入场动画 169 | let delay = 80; // 动媒体库画间隔 170 | let id = $(".misty-banner-item").eq(0).addClass("active").attr("id"); // 初次信息动画 171 | $(`.misty-banner-logo[id=${id}]`).addClass("active"); 172 | 173 | await CommonUtils.sleep(200); // 间隔动画 174 | $(".section0 > div").addClass("misty-banner-library-overflow"); // 关闭overflow 防止媒体库动画溢出 175 | $(".misty-banner .card").each((i, dom) => setTimeout(() => $(dom).addClass("misty-banner-library-show"), i * delay)); // 媒体库动画 176 | await CommonUtils.sleep(delay * 8 + 1000); // 等待媒体库动画完毕 177 | $(".section0 > div").removeClass("misty-banner-library-overflow"); // 开启overflow 防止无法滚动 178 | 179 | // 滚屏逻辑 180 | var index = 0; 181 | clearInterval(this.bannerInterval); 182 | this.bannerInterval = setInterval(() => { 183 | // 背景切换 184 | index += index + 1 == $(".misty-banner-item").length ? -index : 1; 185 | $(".misty-banner-body").css("left", -(index * 100).toString() + "%"); 186 | // 信息切换 187 | $(".misty-banner-item.active").removeClass("active"); 188 | let id = $(".misty-banner-item").eq(index).addClass("active").attr("id"); 189 | // LOGO切换 190 | $(".misty-banner-logo.active").removeClass("active"); 191 | $(`.misty-banner-logo[id=${id}]`).addClass("active"); 192 | }, 8000); 193 | } 194 | 195 | /* 初始事件 */ 196 | static initEvent() { 197 | // 通过注入方式, 方可调用appRouter函数, 以解决Content-Script window对象不同步问题 198 | const script = ` 199 | // 挂载appRouter 200 | if (!window.appRouter) window.appRouter = (await window.require(["appRouter"]))[0]; 201 | // 修复library事件参数 202 | //const serverId = ApiClient._serverInfo.Id, 203 | // librarys = document.querySelectorAll(".view:not(.hide) .section0 .card"); 204 | //librarys.forEach(library => { 205 | // library.setAttribute("data-serverid", serverId); 206 | // library.setAttribute("data-type", "CollectionFolder"); 207 | //}); 208 | `; 209 | this.injectCode(script); 210 | } 211 | } 212 | 213 | // 运行 214 | if ("BroadcastChannel" in window || "postMessage" in window) { 215 | if ($("meta[name=application-name]").attr("content") == "Emby" || $(".accent-emby") != undefined) { 216 | Home.start(); 217 | } 218 | } 219 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "Emby Tools.", 4 | "version": "1.0.4", 5 | "description": "Misty Emby Tools.", 6 | "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/amilys/emby-crx/987d7e197d946a66c194f82b5b7d2be4d823b379/res/icon.png -------------------------------------------------------------------------------- /res/icon.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amilys/emby-crx/987d7e197d946a66c194f82b5b7d2be4d823b379/res/icon.psd -------------------------------------------------------------------------------- /script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 创建emby-crx目录并下载所需文件 4 | rm -rf emby-crx 5 | mkdir -p emby-crx 6 | wget https://raw.githubusercontent.com/Nolovenodie/emby-crx/master/static/css/style.css -P emby-crx/ 7 | wget https://raw.githubusercontent.com/Nolovenodie/emby-crx/master/static/js/common-utils.js -P emby-crx/ 8 | wget https://raw.githubusercontent.com/Nolovenodie/emby-crx/master/static/js/jquery-3.6.0.min.js -P emby-crx/ 9 | wget https://raw.githubusercontent.com/Nolovenodie/emby-crx/master/static/js/md5.min.js -P emby-crx/ 10 | wget https://raw.githubusercontent.com/Nolovenodie/emby-crx/master/content/main.js -P emby-crx/ 11 | 12 | # 读取index.html文件内容 13 | content=$(cat index.html) 14 | 15 | # 检查index.html是否包含emby-crx 16 | if grep -q "emby-crx" index.html; then 17 | echo "Index.html already contains emby-crx, skipping insertion." 18 | else 19 | # 定义要插入的代码 20 | code='\n\n\n\n' 21 | 22 | # 在之前插入代码 23 | new_content=$(echo -e "${content/<\/head>/$code<\/head>}") 24 | 25 | # 将新内容写入index.html文件 26 | echo -e "$new_content" > index.html 27 | fi -------------------------------------------------------------------------------- /static/css/style.css: -------------------------------------------------------------------------------- 1 | ::-webkit-scrollbar { 2 | width: .3em !important; 3 | } 4 | 5 | .mdl-spinner { 6 | zoom: .5; 7 | } 8 | 9 | .skinHeader-withBackground { 10 | right: 0 !important; 11 | background-image: linear-gradient(rgba(0,0,0,.5), transparent); 12 | background-color: unset; 13 | } 14 | 15 | .view:not(.hide) .skinHeader, .skinHeader-withBackground.headroom-scrolling { 16 | width: auto; 17 | background-image: linear-gradient(black, transparent) !important; 18 | background-color: unset !important; 19 | } 20 | 21 | .view[data-type=home]:not(.hide) > div:nth-child(1) .scrollSlider.padded-top-page { 22 | padding-top: 0 !important; 23 | } 24 | 25 | .view:not(.hide) .itemsContainer-finepointerwrap { 26 | flex-wrap: initial !important; 27 | -webkit-flex-wrap: initial !important; 28 | } 29 | 30 | .view:not(.hide) .section0 { 31 | z-index: 2; 32 | } 33 | 34 | .view:not(.hide) .section0 .cardText { 35 | position: absolute; 36 | top: 0; 37 | display: flex; /* 如果不需要媒体库标题显示, 请将flex改为none */ 38 | width: 100%; 39 | height: 100%; 40 | padding: 0; 41 | background-color: rgba(0, 0, 0, .5); 42 | font-weight: bolder; 43 | font-size: larger; 44 | border-radius: 0.3em; 45 | transition: .2s; 46 | opacity: 0; 47 | } 48 | 49 | .view:not(.hide) .section0 .backdropCard:hover .cardText { 50 | opacity: 1; 51 | } 52 | 53 | .view:not(.hide) .section0 .cardText button { 54 | text-decoration: none; 55 | } 56 | 57 | .view:not(.hide) .section0 .cardOverlayContainer { 58 | background: none; 59 | } 60 | 61 | .view:not(.hide) .section0 .cardOverlayContainer label, 62 | .view:not(.hide) .section0 .sectionTitleContainer { 63 | display: none !important; 64 | } 65 | 66 | .view:not(.hide) .section0 .cardBox-touchzoom { 67 | box-shadow: 0 8px 10px rgb(0 0 0 / 15%); 68 | } 69 | 70 | .view:not(.hide) .section0 .backdropCard { 71 | transition: all 1.5s cubic-bezier(0, 1.75, .25, 1) 0s; 72 | } 73 | 74 | .view:not(.hide) .section0 .backdropCard:hover { 75 | transform: scale(1.1) !important; 76 | } 77 | 78 | .view:not(.hide) .section0 .scrollbuttoncontainer { 79 | top: 0; 80 | bottom: calc(.8em - min(.72em, max(.48em, 1.78vw)) / 2); 81 | background-color: rgba(0, 0, 0, 0); 82 | overflow: visible; 83 | } 84 | 85 | .view:not(.hide) .section0 .scrollbuttoncontainer:hover > .emby-scrollbuttons-scrollbutton{ 86 | background-color: rgba(0, 0, 0, .5); 87 | transform: scale(.85) !important; 88 | } 89 | 90 | .tabs-viewmenubar-backgroundcontainer:not(.tabs-viewmenubar-backgroundcontainer-tv) { 91 | background: 0 0 !important; 92 | -webkit-backdrop-filter: blur(10px) !important; 93 | backdrop-filter: blur(10px) !important; 94 | } 95 | 96 | .misty-banner { 97 | position: relative; 98 | overflow: hidden; 99 | } 100 | 101 | .misty-banner-cover { 102 | width: 100%; 103 | max-height: 100vh; 104 | user-select: none; 105 | object-fit: cover; 106 | -webkit-mask-image: linear-gradient(to top, transparent 0%, black 30%); 107 | mask-image: linear-gradient(to top, transparent 0%, black 30%); 108 | } 109 | 110 | .misty-banner-logo { 111 | position: absolute; 112 | user-select: none; 113 | object-fit: contain; 114 | height: clamp(0rem, -2.182rem + 10.91vw, 6rem); 115 | /* width: fit-content; */ 116 | transform: translateY(calc(-50% - clamp(-2rem, -3.455rem + 7.27vw, 2rem))); 117 | right: calc(3.4% + min(0.72em, max(0.48em, 1.78vw))); 118 | opacity: 0; 119 | transition: 1s; 120 | transition-delay: .8s; 121 | } 122 | 123 | .misty-banner-logo.active { 124 | transform: translateY(calc(-100% - clamp(-2rem, -3.455rem + 7.27vw, 2rem))); 125 | opacity: 1; 126 | } 127 | 128 | .misty-loading { 129 | z-index: 99999999; 130 | position: fixed; 131 | top: 0; 132 | left: 0; 133 | width: 100%; 134 | height: 100%; 135 | background-color: rgba(0, 0, 0, 1); 136 | display: flex; 137 | align-items: center; 138 | justify-content: center; 139 | flex-direction: column; 140 | } 141 | 142 | .misty-loading h1 { 143 | margin: 0; 144 | margin-bottom: 3rem; 145 | text-transform: uppercase; 146 | transition: .8s; 147 | transform: scale(1.15); 148 | opacity: 0; 149 | } 150 | 151 | .misty-loading h1.active { 152 | transform: scale(1); 153 | opacity: 1; 154 | } 155 | 156 | .misty-loading .mdl-spinner { 157 | margin: 0; 158 | position: initial; 159 | } 160 | 161 | .misty-loading .mdl-spinner__layer-1 { 162 | border-color: #fff; 163 | } 164 | 165 | .misty-banner-library { 166 | position: absolute; 167 | width: 100%; 168 | height: 100%; 169 | top: 0; 170 | padding: clamp(0rem, -1.313rem + 3.75vw, 1.5rem) 0; 171 | box-sizing: border-box; 172 | display: flex; 173 | justify-content: flex-end; 174 | flex-direction: column; 175 | background-image: linear-gradient(90deg, rgba(0, 0, 0, .6), transparent); 176 | } 177 | 178 | .misty-banner-body { 179 | display: flex; 180 | position: relative; 181 | left: 0; 182 | transition: all 1.5s cubic-bezier(0.15, 0.07, 0, 1) 0s; 183 | } 184 | 185 | .misty-banner-item { 186 | min-width: 100%; 187 | } 188 | 189 | .misty-banner-info { 190 | width: 100%; 191 | margin: min(.72em, max(.48em, 1.78vw)); 192 | margin-top: 0; 193 | position: absolute; 194 | top: 0; 195 | z-index: 1; 196 | height: 100%; 197 | height: -webkit-fill-available; 198 | display: flex; 199 | flex-direction: column; 200 | justify-content: center 201 | } 202 | 203 | .misty-banner-info > * { 204 | transition: all 2.5s cubic-bezier(0, 1.41, 0.36, 0.93) .4s; 205 | transform: translateY(150%); 206 | opacity: 0 !important; 207 | } 208 | 209 | .misty-banner-item.active .misty-banner-info > * { 210 | transform: translateY(0); 211 | opacity: 1 !important; 212 | } 213 | 214 | .misty-banner-info > div:nth-child(2) { 215 | transition-delay: .6s; 216 | } 217 | .misty-banner-info > div:nth-child(3) { 218 | transition-delay: .8s; 219 | } 220 | 221 | .misty-banner-info h1 { 222 | color: #fff !important; 223 | font-size: clamp(2rem, -.362rem + 6.75vw, 4.7rem); 224 | font-weight: bolder; 225 | margin: 0; 226 | text-shadow: 0 4px 10px rgb(0 0 0 / 20%); 227 | /* margin-bottom: clamp(0rem, -.545rem + 2.73vw, 1.5rem); */ 228 | max-width: 80%; 229 | display: -webkit-box !important; 230 | -webkit-box-orient: vertical; 231 | -webkit-line-clamp: 1; 232 | overflow: hidden; 233 | } 234 | 235 | .misty-banner-info p { 236 | color: #fff !important; 237 | font-size: clamp(.6rem, .4rem + 1vw, 1.6rem); 238 | font-weight: bold; 239 | max-width: 47%; 240 | opacity: .7; 241 | /* overflow: hidden; 242 | white-space: nowrap; 243 | text-overflow: ellipsis; */ 244 | display: -webkit-box !important; 245 | -webkit-box-orient: vertical; 246 | -webkit-line-clamp: 2; 247 | overflow: hidden; 248 | } 249 | 250 | .misty-banner-info button { 251 | cursor: pointer; 252 | margin-top: clamp(0rem, -2.625rem + 7.5vw, 3rem); 253 | width: 6em; 254 | height: 1.8em; 255 | background-color: #fff; 256 | border: none; 257 | font-size: clamp(.6rem, -.275rem + 2.5vw, 1.6rem); 258 | border-radius: 10px; 259 | font-weight: bold; 260 | letter-spacing: 2px; 261 | box-shadow: 0 2px 7px rgba(1, 1, 1, -.8); 262 | font-family: system-ui; 263 | transition: .2s; 264 | } 265 | 266 | .misty-banner-info button:hover{ 267 | transform: scale(.95); 268 | } 269 | 270 | @media screen and (max-width: 62.5em) { 271 | .misty-banner-info button { 272 | margin-top: 0; 273 | } 274 | } 275 | @media screen and (max-width: 52em) { 276 | .misty-banner-info button, 277 | .misty-banner-info p { 278 | display: none; 279 | } 280 | } 281 | 282 | @media screen and (max-width: 35em) { 283 | .misty-banner-info, 284 | .misty-banner-logo { 285 | display: none !important; 286 | } 287 | .misty-banner-body{ 288 | opacity: 0; 289 | } 290 | } 291 | 292 | .misty-banner .backdropCard { 293 | transition-duration: 0; 294 | transform: translateY(80%); 295 | opacity: 0; 296 | } 297 | 298 | .misty-banner-library-show { 299 | transition-duration: 1.7s !important; 300 | transform: translateY(0) !important; 301 | opacity: 1 !important; 302 | } 303 | 304 | .misty-banner-library-overflow { 305 | overflow: visible !important; 306 | } 307 | -------------------------------------------------------------------------------- /static/img/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amilys/emby-crx/987d7e197d946a66c194f82b5b7d2be4d823b379/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