mx pak1 Vmbackground.htmlwI css\options.css ֚def.json'QF defaults.jsn**'xZ icon-18.png-s icon.png1r&"icons\icon_16.pngK#Jicons\icon_32.pngO'Uicons\icon_48.pngV- ^includes\app.js`= ڃ includes\opener.jsCmckzincludes\viewer.js|50 js\app_bg.js<wpjs\background.jsrc js\frames.jsi!MJM js\options.jsdo3G#locale\cs-cz.iniFÕlocale\el-gr.iniǴd| locale\en.ini5-ϖlocale\es-mx.ini~Nlocale\fi-fi.ini^yvlocale\fr-ca.inilYMlocale\hu-hu.ini &locale\ko-kr.ini 2=locale\nl-nl.ini0 =plocale\pl-pl.iniAVlocale\pt-br.iniRKlocale\ru-ru.inice locale\uk-ua.ini~j )locale\zh-cn.iniVg locales.jsnƿ options.htmld :: Viewhance :: bgProcess ::-moz-selection { background: #adf; } ::selection { background: #adf; } html { cursor: default; min-height: 100%; background-color: #f3f3f5; } body { display: none; font: 13px "Lucida Grande", "Lucida Sans Unicode", "Tahoma", sans-serif; position: relative; background-color: #fff; max-width: 700px; min-height: 300px; margin: 0 auto; padding: 6px 15px 15px; border-top: 0; box-shadow: 0 0 6px #666; -webkit-box-shadow: 0 0 6px #666; } a { color: #1155ef; text-decoration: none; } a:hover { color: #000; } :focus { outline: none; } .fn { float: none; } /* http://nicolasgallagher.com/micro-clearfix-hack/ */ .cf:before, .cf:after { content: ""; display: table; } .cf:after { clear: both; } #app_version { display: block; padding-bottom: 5px; } hr { border: 1px solid #eee; margin: 10px 0; } #right_panel { position: absolute; left: 100%; top: 0; } #right_panel > aside { padding: 0 5px 3px 8px; position: fixed; top: 0; background-color: rgba(255, 255, 255, .8); text-align: center; box-shadow: 2px 2px 2px #aaa; -webkit-box-shadow: 2px 2px 2px #aaa; overflow: hidden; } #right_panel > aside, section { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .hidden, body.opera .opera, body.firefox .firefox, body.chrome .chrome, body.safari .safari, body.maxthon .maxthon { display: none; } .logo { display: block; margin-top: 5px; width: 128px; height: 128px; background: url(../icon.png) no-repeat center; -webkit-transition: -webkit-box-shadow .2s; transition: box-shadow .2s; border-radius: 10px; } .logo:hover { box-shadow: 0 0 10px #bef; -webkit-box-shadow: 0 0 10px #bef; } body > form > section { display: none; } nav { margin-bottom: 20px; text-align: center; } nav > a { -webkit-transition: border-bottom-color .5s; transition: border-bottom-color .5s; text-decoration: none; display: inline-block; color: #1155ef; padding: 5px 6px; border-bottom: 3px solid transparent; } nav > a:hover { -webkit-transition: border-bottom-color 0s; transition: border-bottom-color 0s; border-bottom: 3px solid #aaf; color: #000; } nav > .active { color: #000; border-bottom: 3px solid #000; } .prow { clear: both; padding-bottom: 3px; } .prow, .tiptop { position: relative; } .tip { overflow: hidden; position: absolute; padding: 5px 7px; left: -48px; top: -5px; border: 1px solid transparent; max-width: 100%; width: 33px; height: 25px; font: 12px/150% Verdana, sans-serif; white-space: pre-wrap; color: rgba(0, 0, 0, 0); z-index: 1; visibility: hidden; opacity: 0; -webkit-transition: visibility 0s 0.5s, opacity 0.5s, color .7s; transition: visibility 0s 0.5s, opacity 0.5s, color .7s; } .tiptop:hover > .tip:not(:empty), .tipvis > .tip:not(:empty) { -webkit-transition-delay: 0s; transition-delay: 0s; visibility: visible; opacity: 1; } .tip:hover { overflow: visible; left: -45px; background-color: rgba(245, 245, 255, .9); background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #fff), color-stop(100%, rgba(245, 245, 255, 0))); background-image: linear-gradient(to bottom, #fff, rgba(245, 245, 255, 0)); color: #000; padding: 10px; padding-left: 40px; border: 1px solid #ddd; border-left: none; border-radius: 6px; box-shadow: 0 0 10px #666; -webkit-box-shadow: 0 0 10px #666; width: auto; height: auto; } .tip::before { display: inline-block; padding: 0 6px 2px; margin-right: 20px; border: 3px solid #aaa; border-right: none; border-radius: 10px 6px 6px 10px; text-align: center; font: 700 17px Verdana, sans-serif; color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; content: "?"; } .tip:hover::before { position: absolute; top: 5px; left: 5px; } .prow > label, .prow > span:not(.clean) { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; display: inline-block; width: 49.6%; } .prow > label { padding-top: 8px; } .prow:hover label:not(.checkbox), label:not(.checkbox):hover { color: #45f; } .prow > span:not(.clean) { float: right; margin-top: 4px; max-width: 50%; text-align: right; } .prow input[type="text"] { width: 300px; } .prow select { max-width: 308px; } .prow input[type="color"] + input[type="text"], .shorter_input { width: 242px; vertical-align: middle; } .prowone > label, .prowone > span { width: auto !important; padding: 2px 0; } .inp_tf_short { width: 100px !important; } .sub_opt { padding-left: 20px; } input, textarea, select, code, .checkbox, .pager > a { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-transition: color .2s, border-color .2s; transition: color .2s, border-color .2s; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #fff), color-stop(100%, #f5f5f5)); background-image: linear-gradient(to bottom, #fff, #f5f5f5); background-color: rgba(242, 242, 242, 0); padding: 3px; margin: 2px; border: 1px solid #ddd; border-radius: 3px; font: 13px Verdana, sans-serif; } pre, code, textarea { font: 13px Consolas, Monaco, monospace; } code { display: inline-block; background-image: linear-gradient(to bottom, #FFFFFF, #F5F5F5); border: 1px solid silver; padding: 3px 5px; } select { max-width: 100%; } textarea { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-tab-size: 4; -moz-tab-size: 4; -o-tab-size: 4; tab-size: 4; overflow-x: hidden; resize: none; width: 100%; } select:focus, textarea:focus, input[type="text"]:focus, input:hover, select:hover, textarea:hover, .prow:hover input, .prow:hover select, label:hover input, .pager > a:hover, .prow:hover .checkbox, label:hover > .checkbox, .checkbox:hover { border: 1px solid #888; } input[type="checkbox"] { display: none; } .checkbox { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; color: transparent; display: inline-block; vertical-align: middle; width: 20px; height: 20px; padding: 0; position: relative; } .checkbox:after { content: "✔"; font-weight: 700; position: absolute; top: 0; left: 3px; } input[type="checkbox"]:checked + .checkbox { color: #616161; } input[type="number"], input[type="color"] { width: 50px; text-align: center; } input[type="color"] { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; background: none; padding: 2px; vertical-align: middle; } input[type="number"] { width: 60px; box-shadow: none; /* Firefox marks "invalid" inputs */ } input[type="range"] { height: 24px; vertical-align: middle; } output { display: inline-block; min-width: 24px; } h3 { clear: left; } .color_helper { transition: opacity .3s; float: right; opacity: 0.3; } .color_helper:hover { opacity: 1; } .color_helper > input[type="text"] { width: 80px !important; } .shortcuts > label { display: block; } .shortcuts > label:hover input { border: 1px solid #aaa; } .shortcuts input, .sub_shortcuts input { margin: 5px; width: 35px; text-align: center; } .sub_shortcuts input { margin: 0; } .sub_shortcuts li { line-height: 200%; } .op_buttons > button, .action_buttons > span { position: relative; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #fff), color-stop(100%, #f5f5f5)); background-image: linear-gradient(to bottom, #fff, #f5f5f5); cursor: pointer; color: #000; font-weight: 700; font-size: 14px; border-radius: 3px; border: 1px solid #ddd; } .op_buttons > button { -webkit-transition: border-color .3s, color .3s; transition: border-color .3s, color .3s; box-shadow: 0 1px 2px rgba(0, 0, 0, .5); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .5); margin-bottom: 10px; font: 700 14px Arial; width: 95%; padding: 10px 0; } .op_buttons > button:hover { border: 1px solid #999; } .container_info { text-align: center; } #info_sec > pre { white-space: pre-line; } #locales_table { border-collapse: separate; border-spacing: 25px 2px; margin: 0 auto; font: 13px Consolas, Monaco; } #locales_table > tr:hover { border-collapse: separate; border-spacing: 25px 2px; margin: 0 auto; font: 13px Consolas, Monaco; } #locales_table th:first-child { text-align: left; } #locales_table td:last-child { text-align: center; }[{ "type": "extension", "frameworkVersion": "1.0.1", "guid": "{000008f5-8a32-4389-a7da-2daa0e9d7760}", "version": "0.9.9", "title": {"en": "Viewhance"}, "description": {"_t": "APP_DESCRIPTION"}, "author": { "name": "Deathamns", "email": "deathamns@gmail.com" }, "permissions": {"httpRequest": ["*"]}, "config": "options.html", "service": { "main": "background.html#Viewhance,0.9.9" }, "actions": [ { "type": "script", "entryPoints": ["doc_start"], "exclude": ["res"], "js": [ "includes/app.js", "includes/viewer.js" ], "includeFrames": true }, { "type": "script", "entryPoints": ["doc_end"], "exclude": ["res"], "js": [ "includes/opener.js" ], "includeFrames": true } ] }] // Thu, 05 Feb 2015 19:05:03 GMT { "mode": 1, "minUpscale": 0, "imgInfo": "%ow×%oh | %name (%perc%)", "favicon": "", "customCSS": "", "center": true, "wheelZoom": false, "video": true, "vidattrs": "autoplay controls", "lpDelay": 350, "lpLeft": 1, "lpRight": 0, "sendTo": [ "TinEye|https://www.tineye.com/search?sort=size&order=desc&url=%url", "Google|https://images.google.com/searchbyimage?image_url=%url", "Bing|https://www.bing.com/images/searchbyimage?cbir=sbi&imgurl=%url", "Yandex|https://images.yandex.ru/yandsearch?rpt=imagecbir&img_url=%url", "KarmaDecay|http://karmadecay.com/%url", "ZXing QRCode|http://zxing.org/w/decode?full=true&u=%url", "ImgOps|https://imgops.com/%url", "Pixlr|https://apps.pixlr.com/editor/?image=%url" ], "key_mOrig": "0", "key_mFit": "1", "key_mFitW": "2", "key_mFitH": "3", "key_rotL": "E", "key_rotR": "R", "key_flipH": "Q", "key_flipV": "W", "key_cycle": "C", "opener": 0 }PNG  IHDRVΎWIDAT8oTU3Ngj -!Z0jq>\r^]pmA6IiJC;;y9~>n%R %"ԍsxywy?RRh0ZhEV_7b]1rlXg)QR?o]k@1es˫K\ѣ/D!pej38Ȑo}gNҡYzuH70Q184XYhr ,.&YO,ZE&^%Ĭ%s'dU1³cc䝘c:1//'ZOk[zTOxLf<WJ+r9HC{k/MnmDŽZ]#BCLYY@`+P*/lw"wIDATx^}\y{oL!"aB CJfM ;ة-QFF&6 ,JZvx7"Ļ|H`&,rbhFf43=}ϻ;ۭAVܹV?yޏVrAE0- $ @9BNLO%2P''`L(}yD!8Ao'^TU4JS@+CyAބ.~'{U5TQ* hO0mʊ>^9УLV9䑲"NEmY; iN_?+A%l aWB:V01EK1>7W 8YP-2W%=ƔdWR_9J>b' Z'QP,Ok'ӬF#SB#>· wAB'VP ,;_M& <8Iޛ +bi}y pն,LE,?I!%arrYc/N^R9(XNPa`gloV)y&"]fz\VL ? !,K'p"~Y;YKؒ\^HOz@Y)X~f.{G$[@j$(81I!]/Jo!TqNkTpdoOSs_Q@8C0t.лٯ鍴uGVTC1>~7NhCR>|ƚ@o pe Y#,Ƒ 4k.'=OlOUƝyOؚ@Qa IDI+9<9]H < u[MEXCJ 8%Lr\`9 pP#lO2pGDu'#hIbGNqHWTp1(Fѫ!(VH^o茂/E3XMfJfb%8pD}Eq2 {ŮGYNYeMvu)`yǂw5$EZ̒P$@mHiΤ>,i; F~DpBOe(Y9+E1P~ {m>& 㰮 Vvnd@ ¾@)#{U( ?Bf >~=C7\ h("{zt'ɳ nBN7\Dҳbƻ{&BoOVSčk4sU #iǚX8S*#E`2cMcLM QmBi,8fʖ _~n߽{LdD8Xa`S$m34]λ~ {GENHV P_pMH7j^v+u`h ;lpv2VBy&!`8@rH;C避xw1>?% i׌Ǐv݀ˊNˉ ,7atXI$.xkHnչWuXpoٞm;Wv\u0p9xL<+Q"WZRIcɲ1$!/3ː=#+/;p^ᤁv@T5XpW :fw92(܀2/ o3",F,qJG[>8{7TPgR2?'=9K۹ARE:et6&>yu]^D%1$= gO8p~;Aё^/kҀdlPyPˁݺ8g&"ZCu,+ 9B038~- 㴂CNxx׌ .Vގi;]x<`G[Rъj)椠 CI( kĕ{vYBv(vxi?AQj d9ۂAj/\noR( x;R!rCv%;lㅀytz`‹f?]>vզ}lE$\_cZp,?@$p໮֦<@{1{uGú)ǸQHQc͉'r5C x c< .Q7t#@υ7@[Ӑ~\vٺuTLj@b]pIgC\24fJo)g8.v˜*+OdX%,~El]}яͳOѫH'ޔ@A]>)tFv\^Qk'>xstN9p@MPE%N`GgϭɊ.R塆0J^@8 LՐeUhUV} <^nW 53to&˝+ \NZD^2!E~TIBPgk\*WGgPm:)_2JpH_qb 1@vHr z!t,Z-e&aΩQBxޓi_KODsZ*()-Sc:@]o%?67waL,ZSO ɫ02U~Uk?hC_RoBHJ7ح ߕӑ#i jODHVt I(laS`DtVh/挗0&I1/: 8###x5󟭶Xn{E?ъUg<3SӐ> \^^l=3fDpI_Aӿ(N[JyH`]lh3Pi+R#SPձN9BvҾ;Ib7(7\MXSSY8[ٰ[B`t$\cB@&p)*uy|ݭ'?kS+3dž9rJ&r*74~]@{iZC FTƐ#p>BGzY?ҬQUS6qp2W&зRjdZ3G3)SOj:G,xJPo2Y [FDgϋ{.8 94R͏wj~Dbmt~dՈ p%%ڋ 9:Sq倫4(H_I:!}چ KN"(o=]u GN\G"m Xno X;-ʃX Gj|BiLQYm0 o6γI#,_p^ܙOYX0rDP_@VFK̉Sqp\8xTj8ʷL.oE` . 9/9u? 2(־9;)Vlv{ҥ_$\2A’k.Tj="=,? yߨEoB<}A蟟8οs$P`p rMSC A,S}3X»ܩ/8;pAsh%k@0ȋ8 n|c7́I3tǔ4:ہ`R၍3Q_>>)Li,}eblVZkCz@X[Ṕj( /ŝȡ].>;"s4S䮸@[9Yq;sG[?g;ز|0#_ȁC?5 2^p>%78vkjǥ 6>{r`LJ+ |Ng,]q;ՂAD~d@y;G ;pO?>Efas q7F1P 0qd3̱! 9c|vӓAB2_󡒘6|{;+>q>qX Ld!P8hC}ɂDhpON:tqgI*zŤzǐ<'9 A,.-A /d^36wu; '#ä~++s΃&0"zfQXxKib|X߼AAOG`EꄽfqHh *J(*z\  2!w^1 y̿ mT^ <\O4zt R"@8@'2priE:o8H`~U@? Uc[tR %qq/ZE3SS @GD71%[1h肜J~A`pcoe* b5RxQDdP*$Ah Ϋ eE߷&]8qL;=F2D1 lD|h*Sj?:L!n g0y V~y[}ndlfuJ\ ](! 1'\eJ_~jHnqB/.IrԄnIENDB`PNG  IHDRasRGBgAMA a pHYsodtEXtSoftwarepaint.net 4.0;imIDAT8O-Ogg-zv%[nD3c&u )ȀЁRhK-WGKKm)-`2~{J<;s]ܒTy[ǁx#PLm#HCIO|/cQ9K^ex)`UxUJ&Dps 7vrᵋ̆"K#ĥlNd<;q5,]J6}/d&'IrB ͨYEaG.G[ G+GS5cIQtk M?!.!OCR9*\<`iSbMZ Uzp-@SG>@f(%7R4xtv)e|] wpoZ x@#͗C>jܚKro]t,'(LIFW;Ẓ^'< qFb1M=EXjwtyDq *=.bk[vNiԌopJ,:g#\jRP?9CBl:~vɯln3F~kf8U9Li<:*tV:3 q /7Ňl}{{\OsM^f?UkLs;3?(yN >R=J6`r&^I.?n(%-xﺞ_aa+U[LwYYiz3M׊Jz(}sa:*wE:ߋ2OMiLE2 ~эyh 0Q4K{]9ߟ4nd KF?֌r﹋ujcqGW+aIENDB`PNG  IHDR DPLTEֱԭԣϝԝˍЊ҇ч҇ӋՍԌҐ֔Քڙڔ֑Շ΃͂Ђ̅}urrk|ۄޅ}uruvzrnpswx~ܑܛޡߠݩݮ۳ڮ֚ڙ̍ЅȒÌʷyzrĴsqfgc^TNI}Bw:t>p9f2e5_;Z8T1W3N2I1F8B@IEMCXHbJdPoWwVvbjkukxj|lor|}{}jph{nj[_Q_F~EB8ӌ+fH؀ D fl8{sM8 ]#r;c=ht!Z!֋ay|[u߽7nˆe [of_-vb.@|yҐ,o~AX4/ޓh.8?є4*KvGC,Fo?װXBSez+QLő #L'֛፣CNڪ?EC,e䋭`nj~L&kӓBteL}08!$5J('U~^ja4(v)0~@T+nH "h%@K3 ^#UQ MT@9_ zĚ^'[IENDB`PNG  IHDR00` PLTEms$v(z084:?H~EzBw?q;k3i9c3`2Z:[:T2S9N7J0J4C;EBLCXASNZHaPfPn^hm`TT2;1rMVQX\dblluqkox~}ل܇҇ыӑ֌ԍѐՌדٔ՘טܕےݗٛߵݦוӖztwvsmmg`V^bhqy~}ysouqɃЂ~̂̇φЍӉɅ̝ʤΗ٤ܵ٥ɠqlxY\cSSrJKA@S`lzeqZ{b}jϴ֖omyqidyъޠűǣܧިץ̟s8itRNS0>I|IDATx]ole video:first-child, body > div:only-child > video:first-child' ); // Firefox doesn't handle redirects properly, so it gives the previous URL here if (d && (browser.firefox || d.currentSrc === window.location.href)) { return document.mediaType = 'video'; } } browser.maxthon = true; browser.runtime = external.mxGetRuntime(); Port = { listenerId: Math.random().toString(36).slice(2), emptyListener: function() {}, listen: function(listener) { if (this.listener && !listener) { browser.runtime.listen(this.listenerId, this.emptyListener); } this.listener = listener; if (listener) { browser.runtime.listen(this.listenerId, this.listener); } }, send: function(message, msg_name) { browser.runtime.post(msg_name || 'service', { message: message, mxPort: { id: this.listenerId, url: location.href } }); } }; if (location.protocol === 'mxaddon-pkg:') { _ = function(s, t) { if (t = browser.runtime.locale.t(s)) { return t[0] === '"' ? JSON.parse(t) : t; } return s; }; browser.insertHTML = function(n, html) { n.innerHTML = html; }; } /* global browser, Port, mediaType */ "use strict"; // Should not run on image pages if (!mediaType() && document instanceof window.HTMLDocument && (!browser.safari || location.protocol !== 'safari-extension:')) { Port.listen(function(cfg) { Port.listen(null); cfg = cfg && cfg.prefs && JSON.parse(cfg.prefs).opener; if (!cfg) { return; } var mdownstart, md_x, md_y; var checkBG = function(imgs) { // ("...\"") - Gecko // (...) or ('...)') - WebKit // ("..."") - Presto var rgx = /\burl\(([^'"\)][^\)]*|"[^"\\]+(?:\\.[^"\\]*)*|'[^'\\]+(?:\\.[^'\\]*)*)(?=['"]?\))/g; imgs = (imgs.backgroundImage + imgs.content + imgs.listStyleImage).match(rgx); if (imgs === null) { return imgs; } var i, pos; for (i = 0; i < imgs.length; ++i) { pos = imgs[i][4]; pos = pos === '"' || pos === "'" ? 5 : 4; imgs[i] = imgs[i].slice(pos); } return imgs; }; var checkIMG = function(node) { var nname = node.nodeName.toUpperCase(); if (nname === 'IMG' || nname === 'EMBED' || node.type === 'image') { return node.src; } else if (nname === 'CANVAS') { return node.toDataURL(); } else if (nname === 'OBJECT') { if (node.data) { return node.data; } } else if (nname === 'AREA') { node = document.querySelector('img[usemap="#' + node.parentNode.name + '"]'); if (node && node.src) { return node.src; } } else if (nname === 'VIDEO') { nname = document.createElement('canvas'); nname.width = node.clientWidth; nname.height = node.clientHeight; nname.getContext('2d').drawImage(node, 0, 0, nname.width, nname.height); return nname.toDataURL('image/jpeg'); } else if (/^\[object SVG/.test(node.toString())) { node = (new window.XMLSerializer).serializeToString( node.ownerSVGElement === null ? node : node.ownerSVGElement ); if (typeof node === 'string') { return 'data:image/svg+xml,' + encodeURIComponent(node); } } else if (node.poster) { return node.poster; } return null; }; window.addEventListener('mousedown', function(e) { if (e.button !== 2) { return; } mdownstart = e.timeStamp; // context menu should work where the mousedown event happened (Chrome...) md_x = e.clientX; md_y = e.clientY; }, true); window.addEventListener('contextmenu', function(e) { if (!mdownstart || e.button !== 2 || md_x != e.clientX || md_y != e.clientY) { return; } var elapsed = e.timeStamp - mdownstart >= 300; if (!(e.ctrlKey && e.altKey && !e.shiftKey && !elapsed && cfg > 1 || elapsed && (cfg === 1 || cfg === 3) && !e.ctrlKey && !e.shiftKey && !e.altKey)) { return; } var url, r; var urls = [] var el = 30; var reIgnore = /^(html|body)$/i; // not exactly what we want var xpath = document.evaluate( '. | ./ancestor::*[position()<' + el + '] | ./preceding::*[position()<' + el + '][not(head) and not(ancestor::head)] | ./descendant::*[position()<' + el + '] | ./following::*[position()<' + el + ']', e.target, null, 4, null ); while (el = xpath.iterateNext()) { if (reIgnore.test(el.nodeName) && !reIgnore.test(e.target.nodeName)) { continue; } r = el.getBoundingClientRect(); if (!r || !(e.clientX >= r.left && e.clientX <= r.left + r.width && e.clientY >= r.top && e.clientY <= r.top + r.height)) { continue; } if (url = checkIMG(el)) { urls.push(url); } if (url = checkBG(window.getComputedStyle(el))) { urls = urls.concat(url); } } if (!urls || !urls.length) { return; } e.stopImmediatePropagation(); e.preventDefault(); var i; var filter = {}; for (i = 0; i < urls.length; ++i) { filter[urls[i]] = true; } Port.send({ cmd: 'open', url: Object.keys(filter).reverse() }); }, true); }); Port.send({cmd: 'hello'}); } /* global browser, Port, buildNodes, mediaType */ 'use strict'; var init = function(win, doc, head) { if (typeof Port === 'undefined' || !doc || !doc.body || !head || !head.prefs) { return; } var cfg = JSON.parse(head.prefs); var media = doc.body.querySelector('img' + (cfg.video ? ', video' : '')); if (!media) { init = null; return; } var pdsp = function(e, d, p) { if (!e || !e.preventDefault || !e.stopPropagation) { return; } if (d === void 0 || d === true) { e.preventDefault(); } if (p === false) { return; } e.stopImmediatePropagation(); }; var shortcut = { specKeys: { 8: 'Backspace', 9: 'Tab', 13: 'Enter', 16: 'shift', 17: 'ctrl', 18: 'alt', // control keys are not capital 27: 'Esc', 32: 'Space', 33: 'PgUp', 34: 'PgDn', 35: 'End', 36: 'Home', 37: 'Left', 38: 'Up', 39: 'Right', 40: 'Down', 45: 'Ins', 46: 'Del', 96: '0', 97: '1', 98: '2', 99: '3', 100: '4', 101: '5', 102: '6', 103: '7', 104: '8', 105: '9', 106: '*', 107: '+', 109: '-', 110: '.', 111: '/', 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', 219: '[', 220: '\\', 221: ']', 222: "'", 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6', 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12' }, isModifier: function(e) { return e.which > 15 && e.which < 19; }, key: function(e) { return this.specKeys[e.which] || String.fromCharCode(e.which).toUpperCase(); } }; var root, initParams, panning, winW, winH, sX, sY; var noFit = {cur: false, real: false}; var lastEvent = {}; var progress = null; var cancelAction = false; var freeZoom = null; var dragSlide = []; var borderSize = 0; var MAXSIZE = 0x7fff; media.style.display = 'none'; if (browser.opera) { if (mediaType() === 'img') { win.donotrun = media.error = true; media.naturalWidth = 0; media.onclick = win.ondragstart = win.onkeypress = win.onmousedown = win.onmouseup = win.onmousemove = null; } else { doc.body.replaceChild(media, media.parentNode); } } ['class', 'style'].forEach(function(attr) { doc.documentElement.removeAttribute(attr); doc.body.removeAttribute(attr); }); if (head = doc.querySelector('head')) { doc.documentElement.removeChild(head); } head = doc.createElement('head'); if (cfg.favicon) { root = doc.createElement('link'); root.rel = 'shortcut icon'; root.href = cfg.favicon === '%url' && mediaType() === 'img' ? win.location.href : cfg.favicon.replace('%url', encodeURIComponent(win.location.href)); } if (root) { head.appendChild(root); } root = doc.createElement('style'); root.appendChild(doc.createTextNode([ 'html, body{width: 100%; height: 100%; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none}', 'body {cursor: default; margin:0; padding: 0; font: 12px "Trebuchet MS", sans-serif}', 'body > img, body > video {margin:0 !important; background-clip: padding-box;' + browser['box-sizing_css'] + ': border-box; position: absolute}', 'html.audio video{position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: auto !important;' + 'min-width: 300px; width: 50% !important; height: 30px !important; background: transparent; box-shadow: none}', 'h2 {margin: 0; padding-top: 15%; text-align: center; text-shadow: 1px 1px 15px #000; color: #fff; font: 700 30px "Trebuchet MS", sans-serif}', '.m_1 {max-width: 100%; max-height: 100%; width: auto; height: auto}', '.m_2 {width: 100%; height:auto} .m_3 {height: 100%; width: auto}', 'a {text-decoration: none}', ':root.error img, :root.error video {box-shadow: 0 0 10px red}', ':root.error>body>h2 {text-shadow: 1px 1px 15px firebrick}', ':focus {outline: 0}', ':invalid {box-shadow: none}', '#menu {position: fixed; ' + browser['transition_css'] + ': opacity .25s, left .2s; width: 50px; height: 33.33%; top: 0; opacity: 0}', 'ul {display: inline-block; text-align: center; margin: 0; padding: 5px 15px; list-style: none; font-size: 25px; font-weight: 700; background: rgba(0, 0, 0, .6); color: #fff}', 'li {display: block; position: relative}', 'li[data-cmd] {cursor: pointer}', 'li[data-cmd=cycle], li[data-cmd=rotate] {position: relative}', 'li[data-cmd=cycle]::after {content: "\u2195"; position: absolute; left: 25%}', 'li[data-cmd=rotate]::after {content: "\u21BB"; position: absolute; left: 2px}', 'li ul {position: absolute; left: 100%; top: 0; visibility: hidden; opacity: 0; ' + browser['transition_css'] + ': visibility .4s, opacity .2s .3s; text-align: left}', 'li:hover ul {display: block; opacity: 1; visibility: visible}', 'li ul>li {display: block !important; font-size: 15px; padding: 3px 0}', '.send_hosts li > a {color: #fff; background-size: 16px 16px; background-repeat: no-repeat; background-position: 0 3px; padding-left: 25px;}', '#menu>ul>li:hover, .send_hosts li > a:hover {color: silver}', 'li ul>li {white-space: nowrap}', '.filters>ul {font-size: 15px} .filters>form {margin: 0; padding: 0}', 'body.frames, body.frames {text-align: center; overflow-y: scroll !important} body.frames * {margin: 2px}', '#frames > canvas, #frames > img {display: none}', '#current_frame+output {display: inline-block; font-family: Conoslas, monospace; width: 65px; text-align: right}', '.back {font-size: 150%; color: black; text-decoration: none}', '#frames.showall > img, #frames.showall > canvas {display: inline-block !important}', (cfg.customCSS || 'body {background: silver; overflow: hidden} img,video {background: white; box-shadow: 0 0 5px grey}') ].join(''))); head.appendChild(root); doc.documentElement.insertBefore(head, doc.body); init = function() { if (!(media.naturalWidth || media.width || media.videoWidth || mediaType() === 'audio' || initParams === null)) { if (initParams && ++initParams.loop >= initParams.maxLoop && progress) { clearInterval(progress); } return; } if (progress) { clearInterval(progress); progress = null; } root.classList.add(mediaType()); if (mediaType() === 'img') { doc.body.replaceChild(media, doc.images[0]); } else if (mediaType() === 'video') { media.naturalWidth = media.videoWidth; media.naturalHeight = media.videoHeight; } [].forEach.call(doc.body.childNodes, function(node) { if (media !== node) { node.parentNode.removeChild(node); } }); media.style.display = 'block'; if (mediaType() === 'audio') { return; } head.appendChild(doc.createElement('style')).textContent = 'body > img, body > video {max-width:' + Math.min( MAXSIZE, Math.floor(media.naturalWidth * MAXSIZE / media.naturalHeight) ) + 'px;max-height:' + Math.min( MAXSIZE, Math.floor(media.naturalHeight * MAXSIZE / media.naturalWidth) ) + 'px}'; if (!cfg.imgInfo) { cfg.imgInfo = false; } cfg.hiddenScrollbars = win.getComputedStyle(root).overflow === 'hidden' || win.getComputedStyle(doc.body).overflow === 'hidden'; var menu = doc.body.appendChild(doc.createElement('div')); menu.id = 'menu'; if (win.getComputedStyle(menu).display === 'none') { doc.body.removeChild(menu); menu = null; } else { menu.style.cssText = '-webkit-filter: blur(1px); filter: blur(1px)'; if (menu.style.webkitFilter || menu.style.filter) { media.filters = {}; menu.onchange = function(e) { var t = e.target; var filterCSS = ''; var filterName; if (t.value) { if (t.value === t.defaultValue) { delete media.filters[e.target.parentNode.textContent.trim()]; } else { filterName = t.parentNode.textContent.trim(); media.filters[filterName] = t.value + t.getAttribute('unit'); } for (filterName in media.filters) { filterCSS += filterName + '(' + media.filters[filterName] + ') '; } } media.style.webkitFilter = filterCSS; media.style.filter = filterCSS; }; } buildNodes(menu.appendChild(doc.createElement('ul')), [ {tag: 'li', attrs: {'data-cmd': 'cycle'}, text: '\u2194'}, {tag: 'li', attrs: {'data-cmd': 'zoom'}, nodes: [ {tag: 'span', attrs: {style: 'visibility: hidden'}, text: '.'}, {tag: 'span', attrs: {style: 'transform: rotate(-45deg); position: absolute; left: 20%; font-size: 125%'}, text: '\u26B2'} ]}, {tag: 'li', attrs: {'data-cmd': 'flip'}, text: '\u21CB'}, {tag: 'li', attrs: {'data-cmd': 'rotate'}, text: '\u21BA'}, media.filters ? {tag: 'li', attrs: {'class': 'filters'}, nodes: [ '\u2261', {tag: 'form', nodes: [{tag: 'ul', nodes: [ {tag: 'li', nodes: [{tag: 'input', attrs: {type: 'range', min: 0, max: 250, step: 10, value: 100, unit:'%'}}, ' brightness']}, {tag: 'li', nodes: [{tag: 'input', attrs: {type: 'range', min: 0, max: 300, step: 25, value: 100, unit:'%'}}, ' contrast']}, {tag: 'li', nodes: [{tag: 'input', attrs: {type: 'range', min: 0, max: 1000, step: 50, value: 100, unit:'%'}}, ' saturate']}, {tag: 'li', nodes: [{tag: 'input', attrs: {type: 'range', min: 0, max: 100, step: 25, value: 0, unit:'%'}}, ' grayscale']}, {tag: 'li', nodes: [{tag: 'input', attrs: {type: 'range', min: 0, max: 100, step: 100, value: 0, unit:'%'}}, ' invert']}, {tag: 'li', nodes: [{tag: 'input', attrs: {type: 'range', min: 0, max: 100, step: 20, value: 0, unit:'%'}}, ' sepia']}, {tag: 'li', nodes: [{tag: 'input', attrs: {type: 'range', min: 0, max: 360, step: 36, value: 0, unit:'deg'}}, ' hue-rotate']}, {tag: 'li', nodes: [{tag: 'input', attrs: {type: 'range', min: 0, max: 20, step: 1, value: 0, unit:'px'}}, ' blur']} ]}]}, ]} : '', {tag: 'li', attrs: {'data-cmd': 'reset'}, text: '\u2715'}, (/^https?:$/.test(win.location.protocol) && cfg.sendTo.length ? {tag: 'li', attrs: {'class': 'send_hosts'}, nodes: [ '\u2197', {tag: 'ul', nodes: cfg.sendTo.map(function(item) { item = item.split('|'); return {tag: 'li', nodes: [{tag: 'a', attrs: {href: item.slice(1).join('|')}, text: item[0]}]}; })} ]} : null), mediaType() === 'img' ? {tag: 'li', attrs: {'data-cmd': 'frames'}, text: '\u22EF'} : '', {tag: 'li', attrs: {'data-cmd': 'options'}, text: '\u2713'}, ]); menu.style.cssText = 'display: none; left: -' + menu.offsetWidth + 'px'; menu.addEventListener('mousedown', function(e) { var t = e.target; if (t.href && t.href.indexOf('%', t.host.length) > -1) { t.href = t.href.replace(/%url/, encodeURIComponent(media.src)); } pdsp(e, !!t.textContent); }, false); // Load favicons only when the menu item is hovered the first time if (/^https?:$/.test(win.location.protocol) && cfg.sendTo.length) { menu.querySelector('.send_hosts').onmouseover = function() { this.onmouseover = null; [].forEach.call(this.querySelectorAll('.send_hosts > ul > li > a'), function(a) { var url = a.protocol + '//' + (a.getAttribute('data-favicon') || (a.host + '/favicon.ico')); a.style.backgroundImage = 'url(' + url + ')'; }); }; } var handleCommand = function(cmd, e) { if (e.button === 1) { return; } var p = e.type.indexOf('wheel') > -1 && (-e.wheelDelta || e.deltaY) > 0 || e.button === 2 ? 1 : 0; if (cmd === 'cycle') { media.cycle(!p); } else if (cmd === 'flip') { media.flip(media, p); } else if (cmd === 'rotate') { media.rotate(!p, e.ctrlKey); } else if (cmd === 'zoom') { pdsp(e); media.zoomToCenter({wheelDelta: p ? -1 : 1}); } else if (cmd === 'reset' && e.button === 0) { media.reset(); } else if (cmd === 'frames') { Port.listen(function(js) { Port.listen(null); Function('win', 'drawFullFrame', 'errorHandler', js['frames.js'])(win, e.button === 0, function(msg) { // Success if (msg !== null) { alert(msg); msg = menu.querySelector('li[data-cmd="frames"]'); msg.removeAttribute('data-cmd'); msg.style.opacity = '0.2'; return; } if (browser.maxthon) { win.addEventListener('mousedown', function(e) { pdsp(e, false); }, true); } }); }); Port.send({cmd: 'load_frames.js'}); } else if (cmd === 'options' && e.button === 0) { Port.send({cmd: 'open', url: 'options.html'}); } else { p = null; } if (p !== null) { pdsp(e); } }; menu.addEventListener(browser['wheel'], function(e) { var t = e.target; if (t.nodeType === 3) { t = t.parentNode; } if (t.type === 'range') { t.value = Math.max( t.getAttribute('min'), Math.min( parseInt(t.value, 10) + t.getAttribute('step') * ((-e.wheelDelta || e.deltaY) > 0 ? -1 : 1), t.getAttribute('max') ) ); menu.onchange(e); pdsp(e); } else if (!/reset|frames|options/.test(t.getAttribute('data-cmd') || (t = t.parentNode) && t.getAttribute('data-cmd'))) { handleCommand(t.getAttribute('data-cmd'), e); } }, false); menu.onclick = function(e) { var t = e.target; if (t.hasAttribute('data-cmd') || (t = t.parentNode) && t.hasAttribute('data-cmd')) { handleCommand(t.getAttribute('data-cmd'), e); } }; menu.oncontextmenu = function(e) { var t = e.target; if (t.type === 'range') { t.value = t.defaultValue; menu.onchange(e); pdsp(e); } else if (t.hasAttribute('data-cmd') || (t = t.parentNode) && t.hasAttribute('data-cmd')) { handleCommand(t.getAttribute('data-cmd'), e); } }; menu.addEventListener(browser['transitionend'], function(e) { if (e.propertyName === 'left' && this.style.left[0] === '-') { menu.style.display = 'none'; } }, false); if (win.Node.prototype && !win.Node.prototype.contains) { win.Node.prototype.contains = function(n) { return n instanceof Node && (this === n || !!(this.compareDocumentPosition(n) & 16)); }; } menu.onmouseover = function() { if (!menu.mtimer) { return; } clearTimeout(menu.mtimer); menu.mtimer = null; menu.style.left = '0'; menu.style.opacity = '1'; }; menu.onmouseout = function(e) { if (this.contains(e.relatedTarget)) { return; } doc.addEventListener('mousemove', menuTrigger, false); menu.mtimer = setTimeout(function() { menu.style.left = '-' + menu.offsetWidth + 'px'; menu.style.opacity = '0'; menu.mtimer = null; }, 800); }; var menuTrigger = function(e) { if (panning || freeZoom) { return; } if (e.clientX > 40 || e.clientY > win.innerHeight / 3) { return; } if (menu.style.display === 'block') { return; } menu.style.display = 'block'; setTimeout(function() { menu.style.left = '0'; menu.style.opacity = '1'; }, 50); doc.removeEventListener('mousemove', menuTrigger, false); }; // Safari showed the menu even if the cursor wasn't at the edge setTimeout(function() { doc.addEventListener('mousemove', menuTrigger, false); }, 500); } var afterCalcTimeoutCallback = function() { // Gecko and WebKit/Blink render scrollbars for a split of a second, // even if the image fits into the view-port winH = doc.compatMode[0] === 'B' ? doc.body : root; winW = winH.clientWidth; winH = winH.clientHeight; media.calcFit(); media.setInfo(); media.setCur(); }; var afterCalc = function() { if (media.calcFit) { winH = doc.compatMode[0] === 'B' ? doc.body : root; winW = winH.clientWidth; winH = winH.clientHeight; media.setPos(); setTimeout(afterCalcTimeoutCallback, 0xf); } }; media.resize = function(m, w) { if (m === -1 || (m === -1 && freeZoom)) { if (w) { this.style.width = w; } } if (m === void 0) { m = 1; } if (m !== -1 && this.mode === -1) { this.style.width = this.style.height = ''; } this.mode = m; this.className = 'm_' + m; if (this.naturalWidth) { afterCalc(); } }; media.setPos = function() { var s = this.style; if (cfg.center) { s.top = Math.max(0, (winH - this.offsetHeight) / 2) + 'px'; s.left = Math.max(0, (winW - this.offsetWidth) / 2) + 'px'; } else { s.top = s.left = '0'; } this.box = this.getBoundingClientRect(); if (this.box.left < 0) { s.left = (parseInt(s.left, 10) - this.box.left - win.pageXOffset) + 'px'; } if (this.box.top < 0) { s.top = (parseInt(s.top, 10) - this.box.top - win.pageYOffset) + 'px'; } }; media.setInfo = function() { if (!cfg.imgInfo || !(media.naturalWidth && media.naturalHeight)) { return; } doc.title = cfg.imgInfo.replace(/%(o?[wh]|url|name|ratio|perc)/g, function(a, a1) { switch (a1) { case 'w': return media.clientWidth; case 'h': return media.clientHeight; case 'ow': return media.naturalWidth; case 'oh': return media.naturalHeight; case 'url': return win.location.href; case 'name': return media.alt; case 'ratio': return Math.round(media.clientWidth / media.clientHeight * 100) / 100; case 'perc': return ~~(0.5 + 1e4 * (media.clientWidth / media.naturalWidth)) / 100; } }); }; media.calcFit = function() { var box = this.box || this.getBoundingClientRect(); noFit = { cur: box.width <= winW && box.height <= winH, real: this.naturalWidth <= winW && this.naturalHeight <= winH }; }; media.wheelZoom = function(e) { stopScroll(); pdsp(e); var w = media.offsetWidth; var h = media.offsetHeight; if ((-e.wheelDelta || e.deltaY) > 0) { media.resize(-1, Math.max(1, w * 0.75) + 'px'); } else { var width = w * (4 / 3); media.resize(-1, (width > 10 ? width : width + 3) + 'px'); } if (e.keypress || e.target.nodeName.toUpperCase() === 'IMG') { win.scrollTo( (e.offsetX || e.layerX || 0) * media.offsetWidth / w - e.clientX + borderSize, (e.offsetY || e.layerY || 0) * media.offsetHeight / h - e.clientY + borderSize ); } }; media.zoomToCenter = function(e) { pdsp(e); this.wheelZoom({ keypress: true, wheelDelta: e.wheelDelta, clientX: winW / 2, clientY: winH / 2, offsetX: win.pageXOffset + media.offsetLeft + winW / 2, offsetY: win.pageYOffset + media.offsetTop + winH / 2 }); }; media.cycle = function(back) { var mode = (this.mode === 1 ? 0 : this.mode) - (back ? 1 : -1); if (mode === 1) { mode = mode - (back ? 1 : -1); } else if (mode < 0) { mode = 3; } else if (mode > 3) { mode = 0; } this.resize(mode); }; media.reset = function() { if (freeZoom) { doc.removeEventListener('mousemove', drawMask, false); doc.body.removeChild(media.mask); freeZoom = null; cancelAction = false; return; } // Firefox document readyState stucks in 'interactive' for videos, // but videos doesn't need to be loaded anyway if (mediaType() === 'img' && doc.readyState !== 'complete') { return; } var filters = doc.body.querySelector('#menu li.filters > form'); if (filters) { this.style.filter = this.style.webkitFilter = ''; media.filters = {}; filters.reset(); } delete this.curdeg; delete this.scale; this.style[browser['transform']] = this.style.width = this.style.height = ''; this.resize(0); }; media.flip = function(el, ori) { if (!this.scale) { this.scale = {h: 1, v: 1}; } this.scale[ori ? 'h' : 'v'] *= -1; ori = this.scale.h !== 1 || this.scale.v !== 1 ? 'scale(' + this.scale.h + ',' + this.scale.v + ')' : ''; if (this.curdeg) { ori += ' rotate(' + this.curdeg + 'deg)'; } this.style[browser['transform']] = ori; }; media.rotate = function(deg, fine) { var rot; if (!this.curdeg) { this.curdeg = 0; } if (deg) { this.curdeg += (fine ? 10 : 90); } else { this.curdeg -= (fine ? 10 : 90); } win.status = this.curdeg + '°'; rot = 'rotate(' + this.curdeg + 'deg)'; if (this.scale) { rot += ' scale(' + this.scale.h + ', ' + this.scale.v + ')'; } this.style[browser['transform']] = rot; this.setPos(); }; if (cfg.wheelZoom) { doc.addEventListener(browser['wheel'], media.wheelZoom, false); } else { doc.addEventListener(browser['wheel'], function(e) { if (media.clientWidth > winW || media.clientHeight > winH) { stopScroll(); var x = 0; var y = ((-e.wheelDelta || e.deltaY) > 0 ? winH : -winH) / 5; if (media.clientWidth <= winW && media.clientHeight > winH) { if (!cfg.hiddenScrollbars) { return; } } else if (media.clientHeight <= winH && media.clientWidth > winW || e.clientX < winW / 2 && e.clientY > winH - 100) { x = (y < 0 ? -winW : winW) / 5; y = 0; } else if (!cfg.hiddenScrollbars) { return; } win.scrollBy(x, y); pdsp(e); } }, false); } media.setCur = function() { if (this.clientWidth > winW || this.clientHeight > winH) { this.style.cursor = 'move'; } else if ( ((winH >= this.clientHeight && winW >= this.clientWidth) && (winH < this.naturalHeight || winW < this.naturalWidth)) || (noFit.cur && noFit.real && (this.clientHeight < this.naturalHeight || this.clientWidth < this.naturalWidth))) { this.style.cursor = browser['zoom-in']; } else { this.style.cursor = 'default'; } }; win.addEventListener('resize', afterCalc, false); doc.addEventListener('contextmenu', function(e) { doc.removeEventListener('mousemove', onmove, true); if (progress) { clearTimeout(progress); progress = null; } if (cancelAction) { e.preventDefault(); } }, false); var lastMoveX, lastMoveY; var onmove = function(e) { lastMoveX = e.clientX; lastMoveY = e.clientY; if (lastMoveX === lastEvent.clientX && lastMoveY === lastEvent.clientY) { return; } else if (progress) { clearTimeout(progress); progress = lastEvent.button = null; } if (sX === true || noFit.cur) { doc.removeEventListener('mousemove', onmove, true); return; } if (!panning) { panning = win.requestAnimationFrame(onmoveframe); } if (dragSlide.length !== 3) { dragSlide = [ [lastMoveX, lastMoveY], [lastMoveX, lastMoveY], [lastMoveX, lastMoveY] ]; return; } // Opera fires move event before mouseup if (dragSlide[2][0] === lastMoveX && dragSlide[2][1] === lastMoveY) { return; } dragSlide[0] = [dragSlide[1][0], dragSlide[1][1]]; dragSlide[1] = [dragSlide[2][0], dragSlide[2][1]]; dragSlide[2] = [lastMoveX, lastMoveY]; media.dragSlideTime = Date.now(); }; var pan = function() { win.scrollBy(sX - lastMoveX, sY - lastMoveY); sX = lastMoveX; sY = lastMoveY; }; var onmoveframe = function() { pan(); panning = null; }; var startScroll = function() { progress = setInterval(function() { win.scrollBy(dragSlide[0], dragSlide[1]); if (dragSlide[0]) { if (Math.abs(dragSlide[0]) < 1) { dragSlide[0] = 0; } dragSlide[0] /= 1.11; } if (dragSlide[1]) { if (Math.abs(dragSlide[1]) < 1) { dragSlide[1] = 0; } dragSlide[1] /= 1.11; } var atRight = root.scrollWidth - win.pageXOffset === winW, atBottom = root.scrollHeight - win.pageYOffset === winH; if (!(dragSlide[0] && dragSlide[1]) || (!win.pageYOffset && !win.pageXOffset) || (!win.pageYOffset && atRight) || (atBottom && !win.pageXOffset) || (atBottom && atRight)) { stopScroll(); } }, 25); }; var stopScroll = function(e) { if (dragSlide.length) { clearInterval(progress); progress = null; cancelAction = false; dragSlide.length = 0; media.dragSlideTime = false; } if (e) { doc.removeEventListener(browser['wheel'], stopScroll, false); } }; var drawMask = function(e) { if (++freeZoom.counter % 3) { return; } var x = e.clientX - freeZoom.left; var y = e.clientY - freeZoom.top; if (e.ctrlKey) { var rx = freeZoom.prevX ? x - freeZoom.prevX : 0; var ry = freeZoom.prevY ? y - freeZoom.prevY : 0; freeZoom.prevX = x; freeZoom.prevY = y; freeZoom.x += rx; freeZoom.y += ry; freeZoom.X += rx; freeZoom.Y += ry; } else { if (freeZoom.prevX) { delete freeZoom.prevX; delete freeZoom.prevY; } freeZoom.w = Math.abs(freeZoom.X - x); freeZoom.h = Math.abs(freeZoom.Y - y); freeZoom.x = freeZoom.X < x ? freeZoom.X : freeZoom.X - freeZoom.w; freeZoom.y = freeZoom.Y < y ? freeZoom.Y : freeZoom.Y - freeZoom.h; } media.mctx.clearRect(0, 0, media.mask.width, media.mask.height); media.mctx.fillRect(0, 0, media.mask.width, media.mask.height); media.mctx.clearRect(freeZoom.x, freeZoom.y, freeZoom.w, freeZoom.h); }; var longpressHandler = function() { cancelAction = true; progress = null; switch (cfg[lastEvent.button === 2 ? 'lpRight' : 'lpLeft']) { // Fit to width/height case 1: var x, y; if (media.mode === 2 || media.clientWidth === doc.body.clientWidth || (doc.body.clientHeight > media.clientHeight && winW < doc.body.clientWidth)) { x = media.clientWidth; media.resize(3); x = lastEvent.layerX * media.clientWidth / x - winW / 2; y = 0; } else { y = media.clientHeight; media.resize(2); x = 0; y = lastEvent.layerY * media.clientHeight / y - winH / 2; } win.scrollTo(x, y); break; } }; media.addEventListener('mousedown', function(e) { pdsp(e, false); if (e.button === 1 || e.ctrlKey || e.altKey || !e.shiftKey && mediaType() === 'video' && (e.offsetY || e.layerY || 0) > Math.min(media.clientHeight - 40, media.clientHeight / 2)) { return; } if ((e.button === 0 && media.mode < 4) || e.button === 2) { if (e.button === 2) { sX = true; } else { if (!e.shiftKey && noFit.cur && media.clientWidth >= 60 && media.clientWidth - (e.offsetX || e.layerX || 0) <= 30) { lastEvent.clientX = e.clientX; lastEvent.clientY = e.clientY; return; } e.preventDefault(); win.focus(); sX = e.clientX; sY = e.clientY; } if (!e.shiftKey) { doc.addEventListener('mousemove', onmove, true); } } if (!cfg.lpDelay) { return; } // For fine move and free zoom if (e.shiftKey) { cancelAction = true; if (e.button === 0) { freeZoom = { counter: 0, left: parseInt(media.style.left, 10), top: parseInt(media.style.top, 10) }; freeZoom.X = e.clientX - freeZoom.left; freeZoom.Y = e.clientY - freeZoom.top; if (!media.mask) { media.mask = doc.createElement('canvas'); media.mask.className = 'mask'; media.mask.style.cssText = 'display: block; position: fixed; left: 0; top: 0;'; media.mctx = media.mask.getContext('2d'); } doc.addEventListener('mousemove', drawMask, false); var h = media.curdeg && Math.sin(media.curdeg) ? true : false; var w = h ? media.offsetHeight : media.offsetWidth; h = h ? media.offsetWidth : media.offsetHeight; media.mask.width = Math.min(winW, w); media.mask.height = Math.min(winH, h); media.mask.style.left = media.style.left; media.mask.style.top = media.style.top; media.mctx.clearRect(0, 0, media.mask.width, media.mask.height); doc.body.appendChild(media.mask); w = win.getComputedStyle(media.mask).color; media.mctx.fillStyle = !w || w === 'rgb(0, 0, 0)' ? 'rgba(0,0,0,.4)' : w; } } // Is dragSlideing if (progress) { if (stopScroll) { stopScroll(); cancelAction = e.button === 0; } if (e.button === 0) { return; } } if (e.shiftKey || (e.button === 0 && !cfg.lpLeft) || (e.button === 2 && !cfg.lpRight)) { return; } lastEvent.clientX = e.clientX; lastEvent.clientY = e.clientY; lastEvent.layerX = e.offsetX || e.layerX || 0; lastEvent.layerY = e.offsetY || e.layerY || 0; lastEvent.button = e.button; progress = setTimeout(longpressHandler, cfg.lpDelay); }, true); doc.addEventListener('mouseup', function(e) { if (e.button !== 0) { return; } var x, y; if (media.mode < 4) { doc.removeEventListener('mousemove', onmove, true); if (freeZoom) { doc.removeEventListener('mousemove', drawMask, false); doc.body.removeChild(media.mask); var w = Math.min( media.clientWidth, freeZoom.w + Math.min(freeZoom.x, 0) + (freeZoom.x + freeZoom.w > media.mask.width ? media.mask.width - freeZoom.x - freeZoom.w : 0) ); var h = Math.min( media.clientHeight, freeZoom.h + Math.min(freeZoom.y, 0) + (freeZoom.y + freeZoom.h > media.mask.height ? media.mask.height - freeZoom.y - freeZoom.h : 0) ); x = Math.max(0, freeZoom.x); y = Math.max(0, freeZoom.y); freeZoom = null; cancelAction = false; if (!w || !h || x >= media.clientWidth || y >= media.clientHeight) { return; } var nimgw, nimgh; var scrollbars = (win.innerWidth - winW) || (win.innerHeight - winH); var fitW = winW < w * winH / h; fitW = e.ctrlKey ? !fitW : fitW; if (fitW) { nimgw = media.clientWidth * winW / w; nimgh = nimgw * media.clientHeight / media.clientWidth; } else { nimgh = media.clientHeight * winH / h; nimgw = nimgh * media.clientWidth / media.clientHeight; } if (nimgw > MAXSIZE) { nimgw = MAXSIZE; nimgh = media.clientHeight * MAXSIZE / media.clientWidth; } if (nimgh > MAXSIZE) { nimgw = media.clientWidth * MAXSIZE / media.clientHeight; nimgh = MAXSIZE; } var cx = (win.pageXOffset + x + w / 2) * nimgw / media.clientWidth - winW / 2 - scrollbars; var cy = (win.pageYOffset + y + h / 2) * nimgh / media.clientHeight - winH / 2 - scrollbars; media.resize(-1, nimgw + 'px'); win.scrollTo(cx, cy); return; } else if (dragSlide.length === 3) { x = dragSlide[0][0] - dragSlide[2][0]; y = dragSlide[0][1] - dragSlide[2][1]; if ((Date.now() - media.dragSlideTime) > 100) { cancelAction = false; dragSlide.length = 0; return; } if (x || y) { dragSlide.length = 2; dragSlide[0] = x; dragSlide[1] = y; startScroll(); doc.addEventListener(browser['wheel'], stopScroll, false); return; } } } if (progress) { clearTimeout(progress); progress = null; } if (cancelAction) { cancelAction = false; return; } if (e.shiftKey || e.ctrlKey || e.altKey || e.target !== media || lastEvent.button === null || e.clientX !== lastEvent.clientX || e.clientY !== lastEvent.clientY) { return; } if (media.mode < 2 && noFit.real) { if (media.mode === -1) { media.resize(0); } else if (winW / winH < media.naturalWidth / media.naturalHeight || winH === media.offsetHeight && winW > media.offsetWidth) { media.resize(2); } else { media.resize(3); } } else if (media.mode === 1 || noFit.cur) { if (media.naturalWidth === media.clientWidth && media.naturalHeight === media.clientHeight) { return; } x = e.offsetX || e.layerX || 0; y = e.offsetY || e.layerY || 0; if (media.scale) { if (media.scale.h === -1) { x = media.clientWidth - x; } if (media.scale.v === -1) { y = media.clientHeight - y; } } x = x * media.naturalWidth / media.clientWidth - winW / 2; y = y * media.naturalHeight / media.clientHeight - winH / 2; media.resize(0); win.scrollTo(x, y); } else { media.resize(1); } }, true); doc.addEventListener('keydown', function(e) { if (stopScroll) { stopScroll(); } if (shortcut.isModifier(e)) { return; } var key = shortcut.key(e); if (e.ctrlKey || (freeZoom && key !== 'Esc')) { return; } if (key === '+' || key === '-') { e.wheelDelta = key === '+' ? 1 : -1; media.zoomToCenter(e); return false; } var x, y, z; switch (key) { case 'Esc': media.reset(); break; case 'PgUp': x = e.shiftKey ? -winW / 2 : 0; y = e.shiftKey ? 0 : -winH / 2; break; case 'PgDn': x = e.shiftKey ? winW / 2 : 0; y = e.shiftKey ? 0 : winH / 2; break; case 'End': x = e.shiftKey ? root.scrollWidth : win.pageXOffset; y = e.shiftKey ? win.pageYOffset : root.scrollHeight; z = true; break; case 'Home': x = e.shiftKey ? 0 : win.pageXOffset; y = e.shiftKey ? win.pageYOffset : 0; z = true; break; default: x = true; } if (x !== true) { if (x !== void 0) { win[z ? 'scrollTo' : 'scrollBy'](x, y); e.preventDefault(); } return; } switch (key) { case cfg.key_mOrig: media.resize(0); break; case cfg.key_mFit: media.resize(1); break; case cfg.key_mFitW: media.resize(2); break; case cfg.key_mFitH: media.resize(3); break; case cfg.key_cycle: media.cycle(e.shiftKey); break; case cfg.key_rotL: media.rotate(false, e.shiftKey); break; case cfg.key_rotR: media.rotate(true, e.shiftKey); break; case cfg.key_flipH: media.flip(media, 0); break; case cfg.key_flipV: media.flip(media, 1); break; default: x = true; } if (mediaType() === 'video') { x = null; switch (key) { case 'Space': media.togglePlay(); break; case 'Up': case 'Down': key = media.volume + (key === 'Up' ? 0.1 : -0.1); // Must check the range manually, otherwise browsers will throw an error media.volume = key < 0 ? 0 : (key > 1 ? 1 : key); break; default: x = true; } } if (x !== true) { pdsp(e); } }, true); if (mediaType() === 'video') { media.addEventListener('click', function(e) { var top = (e.offsetY || e.layerY || 0); if (top > media.clientHeight - 40) { return; } if (top > media.clientHeight / 2) { media.togglePlay(); } pdsp(e); }); media.addEventListener('dblclick', function(e) { if ((e.offsetY || e.layerY || 0) < media.clientHeight / 2) { pdsp(e); } }); } media.mode = cfg.mode; media.calcFit(); progress = []; if (cfg.minUpscale) { if (media.naturalWidth >= winW * cfg.minUpscale / 100) { progress[0] = 1; } if (media.naturalHeight >= winH * cfg.minUpscale / 100) { progress[1] = 1; } } if (media.mode === 4) { media.mode = media.naturalWidth / media.naturalHeight > winW / winH ? 3 : 2; } else if ((media.mode === 1 || (media.mode === 0 && noFit.real)) && progress.length) { media.mode = media.naturalWidth / media.naturalHeight > winW / winH ? 2 : 3; } if ((media.mode === 2 && media.naturalWidth < winW && !progress[0]) || (media.mode === 3 && media.naturalHeight < winH && !progress[1])) { media.mode = 0; } progress = null; media.resize(media.mode); }; if (mediaType() === 'video') { root = {}; cfg.vidattrs.split(/\s+/).forEach(function(attr) { attr = attr.split('='); if (attr[0] === 'volume') { root[attr[0]] = Math.min(100, Math.max(0, parseInt(attr[1]) / 100)); } else { root[attr[0]] = true; } }); ['autoplay', 'loop', 'controls', 'muted', 'volume'].forEach(function(attr) { if (attr === 'volume') { media[attr] = root[attr] === void 0 ? 1 : root[attr]; } else { media[attr] = root[attr] || false; } }); media.togglePlay = function() { if (this.paused || Math.abs(this.duration - this.currentTime) < 0.01) { this.play(); } else { this.pause(); } }; media.onloadedmetadata = function() { this.onloadedmetadata = null; if (!this.videoHeight) { mediaType('audio'); document.onkeydown = function(e) { var key = shortcut.key(e); if (key === 'Space') { media.togglePlay(); } else if (key === 'Up' || key === 'Down') { key = media.volume + (key === 'Up' ? 0.1 : -0.1); media.volume = key < 0 ? 0 : (key > 1 ? 1 : key); } else { return; } pdsp(e); }; media.ondblclick = function(e) { pdsp(e); }; if (browser.chrome || browser.maxthon || browser.safari) { media.onplaying = function() { this.poster = 'data:image/gif;base64,R0lGODlhAQABAAAAACw='; }; } } if (!media.autoplay) { return; } setTimeout(function() { if (media.currentTime) { media.currentTime = 0; media.play(); } }, 100); }; } else { media = doc.createElement('img'); media.src = win.location.href; } root = doc.documentElement; media.onerror = function() { // Opera fires an error event on local video files when they're close to the end // Firefox did it a few times too, however there was nothing wrong with the video if (media.currentTime > 100 && win.location.protocol === 'file:') { return; } clearInterval(progress); root.classList.add('error'); }; if (win.location.protocol === 'data:') { media.alt = mediaType() + ' (data:)'; if (!cfg.imgInfo) { doc.title = media.alt; } } else { media.alt = (win.location.href.replace(/#.*/, '') .match(/(?:[^\/]+)?$/)[0] || mediaType()) .split('?')[0]; try { // Some Unicode characters caused problems for decodeURIComponent media.alt = decodeURIComponent(media.alt); } catch (ex) {} } if (media.naturalWidth || media.videoWidth || mediaType() === 'audio') { initParams = null; // Firefox and Safari won't position the image without setTimeout setTimeout(init, 0xf); } else { initParams = {loop: 0, wait: 150, maxLoop: 900}; progress = setInterval(init, initParams.wait); setTimeout(function() { if (root.classList.contains(mediaType())) { return; } // Firefox won't show the image if a site uses CSP settings, // so we should use the default image if ((browser.firefox || browser.maxthon) && (mediaType() === 'img' ? !media.naturalWidth && doc.images[0].naturalWidth : !media.videoWidth && doc.body.querySelector('video').videoWidth)) { doc.images[0].style.display = 'block'; clearInterval(progress); return; } media.style.display = 'none'; var h2 = doc.body.appendChild(doc.createElement('h2')); h2.textContent = media.alt; h2.onclick = function() { doc.body.removeChild(this); media.style.display = 'block'; }; }, 1000); } }; (function() { if (browser.safari && location.protocol === 'safari-extension:') { init = null; return; } if (browser.opera || browser.firefox) { if (mediaType()) { Port.listen(function(e) { Port.listen(null); init(window, document, e); }); Port.send({cmd: 'hello'}); } else { init = null; } } else { Port.listen(function(e) { Port.listen(null); if (!mediaType()) { init = null; return; } init(window, document, e); }); Port.send({cmd: 'hello'}); } })(); 'use strict'; var cfg, Tabs, Port, app; if (location.hash) { app = location.hash.slice(1).split(','); app = { name: app[0], version: app[1] }; } app.runtime = external.mxGetRuntime(); cfg = { storage: app.runtime.storage, getItem: function(k, fn) { fn(this.storage.getConfig(k)); }, setItem: function(k, v) { return this.storage.setConfig(k, v); } }; Tabs = new mx.browser.tabs; Tabs.baseURI = app.runtime.getPrivateUrl(); Tabs.getSelected = function(cb) { cb(this.getCurrentTab()); }; Tabs.create = function(p) { if (!/^[^:]{2,20}:/.test(p.url)) { p.url = this.baseURI + p.url; } this.newTab({ url: p.url, activate: p.active }); }; Port = { parseMessage: function(msg) { var id = msg.mxPort.id; return { msg: msg.message, origin: msg.mxPort.url, postMessage: function(msg) { app.runtime.post(id, msg); } }; }, listen: function(func, name) { app.runtime.listen(name || 'service', func); } }; Port.listen(function(e) { e = Port.parseMessage(e); if (e.msg.cmd === 'function') { window[e.msg.fn_name](); } }, 'mx'); /* global cfg, Port, Tabs */ 'use strict'; cfg.getItem('cfg', function(v) { var xhr = new XMLHttpRequest; xhr.overrideMimeType('application/json;charset=utf-8'); xhr.open('GET', 'defaults.jsn', true); xhr.onload = function() { var def_prefs = JSON.parse(this.responseText); var need_update = false; v = v ? JSON.parse(v) : {}; for (var p in def_prefs) { if (v[p] === void 0) { v[p] = def_prefs[p]; need_update = true; } } if (need_update) { cfg.setItem('cfg', JSON.stringify(v)); } }; xhr.send(); }); function onMessage(ev, origin, postMessage) { var e = Port.parseMessage(ev, origin, postMessage); var msg = e.msg; if (!msg.cmd) { return; } switch (msg.cmd) { case 'hello': cfg.getItem('cfg', function(v) { e.postMessage({ cmd: 'hello', prefs: v }); }); break; case 'load_prefs': cfg.getItem('cfg', function(v) { e.postMessage({cfg: JSON.parse(v), app: app}); }); break; case 'save': cfg.setItem('cfg', JSON.stringify(msg.prefs)); break; case 'open': if (!Array.isArray(msg.url)) { msg.url = [msg.url]; } Tabs.getSelected(function(tab) { for (var i = 0; i < msg.url.length; ++i) { Tabs.create({ incognito: !!tab.incognito, url: msg.url[i], active: !msg.nf }); } }); break; case 'load_frames.js': msg = new XMLHttpRequest; msg.overrideMimeType('text/plain;charset=utf-8'); msg.open('GET', 'js/frames.js', true); msg.onload = function() { e.postMessage({'frames.js': this.responseText}); }; msg.send(); break; } return true; // Chrome } Port.listen(onMessage); /* global win, errorHandler, drawFullFrame, browser, buildNodes */ 'use strict'; function $(id) { return document.getElementById(id); } var crc32 = (function() { var crcTable = [], n = 0, c, k; for (; n < 256; ++n) { for (c = n, k = 0; k < 8; ++k) { c = (c & 1) ? 0xedb88320 ^ (c >>> 1) : c >>> 1; } crcTable[n] = c; } return function(s) { var crc = -1, n = 0, l = s.length; while (n < l) { crc = crcTable[(crc ^ s.charCodeAt(n++)) & 0xff] ^ (crc >>> 8); } return crc ^ -1; }; })(); function BinaryTools(data) { this.pos = 0; this.data = data; this.length = data.length; this.littleEndian = false; this.zeropad = '00000000'; this.readByte = function(pos) { return this.data.charCodeAt( pos === void 0 || pos < 0 ? this.pos++ : pos ) & 0xff; }; this.readString = function(length, pos) { if (pos === void 0 || pos < 0) { pos = this.pos; this.pos += length || 0; } return this.data.substr(pos, length || 0); }; this.readBits = function(length, pos) { var curbyte; var bitarray = []; var i = 0; while (i++ < length) { curbyte = this.readByte(pos).toString(2); bitarray.push( this.zeropad.substr(0, this.zeropad.length - curbyte.length) + curbyte ); } return (this.littleEndian ? bitarray.reverse() : bitarray).join(''); }; this.readInt = function(bytes, pos) { if (bytes < 1) { return null; } if (pos === void 0 || pos < 0) { pos = this.pos; this.pos += bytes; } var i; var integer = 0; if (this.littleEndian) { i = bytes - 1; while (i >= 0) { integer += this.readByte(pos + i) << (i-- * 8); } } else { i = 0; while (i < bytes) { integer += this.readByte(pos + i++) << ((bytes - i) * 8); } } return integer >>> 0; }; this.intToBytes = function(integer, i) { if (!i) { i = 4; } var bytes = []; while (i--) { bytes.push((integer >> (i * 8)) & 0xff); } return String.fromCharCode.apply( null, this.littleEndian ? bytes.reverse() : bytes ); }; } if (!win.opera) { // Solves utf8 problems win.btoa = function(b64str) { var b64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; var c1, c2; var pos = 0; var res = ''; var mod = b64str.length % 3; var l = b64str.length - mod; while (pos < l) { c1 = b64str.charCodeAt(pos++) & 0xff; c2 = b64str.charCodeAt(pos++) & 0xff; res += b64chars[c1 >> 2]; res += b64chars[((c1 & 3) << 4) | (c2 >> 4)]; c1 = b64str.charCodeAt(pos++) & 0xff; res += b64chars[((c2 & 0x0f) << 2) | (c1 >> 6)]; res += b64chars[c1 & 0x3f]; } if (mod) { c1 = b64str.charCodeAt(pos++) & 0xff; res += b64chars[c1 >> 2]; if (mod === 1) { res += b64chars[(c1 & 3) << 4]; res += '=='; } else { c2 = b64str.charCodeAt(pos++) & 0xff; res += b64chars[((c1 & 3) << 4) | (c2 >> 4)]; res += b64chars[(c2 & 0x0f) << 2]; res += '='; } } return res; }; } var maxSize = 20 * 1024 * 1024; var xhr = new win.XMLHttpRequest; xhr.overrideMimeType('text/plain; charset=x-user-defined'); xhr.onreadystatechange = function() { if (this.readyState === 2) { var length = this.getResponseHeader('Content-Length'); if (length && length > maxSize) { this.abort(); errorHandler('Image is too large...'); return; } } if (this.responseText) { if (!this.imgType) { // PNG or GIF or WEBP signature imgHead = /^(?:\x89(PNG)\r\n\x1a\n|(GIF)8[79]a|RIFF....(WEBP)VP8X)/; this.imgType = this.responseText.match(imgHead); // Seems like in some cases a character encoding is applied anyway, // however it's enough to check the signature only if (!this.imgType && (this.responseText[1] === 'P' && (chunkSize = 8) || this.responseText[0] === 'G' && (chunkSize = 6) || this.responseText[0] === 'R' && (chunkSize = 16))) { this.imgType = this.responseText.slice(0, chunkSize).split(''); for (i = 0; i < this.imgType.length; ++i) { this.imgType[i] = this.imgType[i].charCodeAt(0) & 0xff; } this.imgType = String.fromCharCode.apply(null, this.imgType).match(imgHead); } if (this.imgType) { this.imgType = this.imgType[2] || this.imgType[1] || this.imgType[3]; } else { this.abort(); this.onprogress = null; errorHandler('Not animated...'); return; } } if (this.readyState !== 4/* || this.status !== 200*/) { return; } if (this.responseText.length > maxSize) { this.onprogress = null; errorHandler('Image is too large...'); return; } var i, IHDR, chunkType, chunkSize; var frames = []; var bin = new BinaryTools(this.responseText); var animation = {}; var imgHead = ''; if (this.imgType === 'PNG') { // https://wiki.mozilla.org/APNG_Specification // Skip signature bin.pos = 8; while (bin.pos < bin.length) { // Read the chunk type chunkType = bin.readString(4, bin.pos + 4); // console.log(i, chunkType, bin.readInt(4, bin.pos)); if (chunkType === 'IHDR') { // Skip chunk length and name bin.pos += 8; animation.width = bin.readInt(4); animation.height = bin.readInt(4); IHDR = bin.readString(5); // Skip crc bin.pos += 4; } else if (!frames.length && chunkType === 'acTL') { animation.numFrames = bin.readInt(4, bin.pos + 8); animation.numPlays = bin.readInt(4, bin.pos + 12); bin.pos += 20; } else if (chunkType === 'fcTL') { bin.pos += 12; i = frames.length; frames.push({ width: bin.readInt(4), height: bin.readInt(4), xOffset: bin.readInt(4), yOffset: bin.readInt(4), delay: 1000 * bin.readInt(2) / (bin.readInt(2) || 100), disposeOp: bin.readInt(1), blendOp: bin.readInt(1), data: 'IDAT' }); if (i === 0 && frames[i].disposeOp === 2) { frames[i].disposeOp = 1; } // Skip crc bin.pos += 4; // console.log(frames[frames.length - 1]); } else if (chunkType === 'IDAT' || chunkType === 'fdAT') { if (!animation.numFrames || animation.numFrames < 2) { break; } // IDAT without acTL chunk should be ignored else if (chunkType === 'IDAT' && !frames.length) { console.log('PNG: ignoring IDAT from animation...'); bin.pos += bin.readInt(4, bin.pos) + 12; continue; } i = (chunkType === 'fdAT' ? 4 : 0); // Read the length, also skip the sequence number from fdAT chunkSize = bin.readInt(4) - i; // Skip chunk type, // also the sequence number in case of the fdAT chunk type bin.pos += 4 + i; frames[frames.length - 1].data += bin.readString(chunkSize); // Skip crc bin.pos += 4; } else if (!frames.length) { // Read the full chunk (length + chunk type + chunkdate + crc) imgHead += bin.readString(bin.readInt(4, bin.pos) + 12); } else { bin.pos += bin.readInt(4, bin.pos) + 12; } } } else if (this.imgType === 'GIF') { // http://www.w3.org/Graphics/GIF/spec-gif89a.txt bin.littleEndian = true; bin.skipSubBlock = function() { do { this.pos += this.readInt(1, this.pos) + 1; if (bin.pos >= bin.length) { throw this.imgType + ': end reached...'; } } while (this.readInt(1, this.pos) !== 0x00); ++this.pos; }; // Skip signature bin.pos = 6; // Logical Screen Descriptor animation.width = bin.readInt(2); animation.height = bin.readInt(2); bin.packed = bin.readBits(1, 10); bin.packed = (bin.packed[0] === '1' ? 3 * 1 << (parseInt(bin.packed.slice(-3), 2) + 1) : 0); imgHead += bin.readString(3 + bin.packed); // Frame index i = 0; while (bin.pos < bin.length) { chunkType = bin.readString(1); // console.log("sentinel: " + chunkType); // Extension block (0x21, an exclamation point '!') if (chunkType === '!') { // optional chunkType = bin.readInt(1); // console.log("ext_label: " + chunkType.toString(16)); // Plain Text Extension if (chunkType === 0x01) { // No support for this, so skip bin.pos += 13; bin.skipSubBlock(); } // Graphics Control Extension else if (chunkType === 0xf9) { bin.packed = bin.readBits(1, bin.pos + 1); frames.push({ delay: (10 * bin.readInt(2, bin.pos + 2)) || 100, // -1 in order to match PNG's indexes, also treat 0 as 1 disposeOp: Math.max(0, parseInt(bin.packed.slice(3, -2), 2) - 1), // sentinel + ext_label data: bin.readString(4, bin.pos - 2) + // with zero delay bin.intToBytes(0, 2) + // transparent color index + block terminator bin.readString(2, bin.pos + 4) }); bin.pos += 6; } // Comment Block Extension else if (chunkType === 0xfe) { bin.skipSubBlock(); } // Application Block Extension else if (chunkType === 0xff) { bin.pos += 12; bin.skipSubBlock(); } // Try to skip anything else else { bin.pos = bin.data.indexOf('\x00', bin.pos); if (bin.pos === -1) { bin.pos = bin.length; } else { ++bin.pos; } } } // Image (0x2C, a comma ',') else if (chunkType === ',') { if (!frames[i]) { frames.push({ delay: 100, disposeOp: 0, // sentinel, ext_label, block size, packed field, delay, // transparent color index, terminator data: '\x21\xf9\x04\x00\x00\x00\x00\x00' }); } frames[i].xOffset = bin.readInt(2); frames[i].yOffset = bin.readInt(2); bin._pos = bin.pos; frames[i].width = bin.readInt(2); frames[i].height = bin.readInt(2); bin.packed = bin.readBits(1); bin.pos += (bin.packed[0] === '1' ? 3 * (1 << (parseInt(bin.packed.slice(-3), 2) + 1)) : 0); // LZW minimum code size ++bin.pos; bin.skipSubBlock(); frames[i]._data = [bin.pos - bin._pos, bin._pos]; ++i; } // Trailer (0x3B, a semi-colon ';') or something else else { break; } } } else if (this.imgType === 'WEBP') { // https://developers.google.com/speed/webp/docs/riff_container bin.littleEndian = true; // WebP file header + VP8X and its chunk size bin.pos = 20; // VP8X flags bin.packed = bin.readBits(1); // Animation flag if (bin.packed[6] === '0') { this.onprogress = null; errorHandler(this.imgType + ': not animated...'); return; } // Reserved 24 bits bin.pos += 3; // Canvas width animation.width = bin.readInt(3) + 1; // Canvas height animation.height = bin.readInt(3) + 1; while (bin.pos < bin.length) { chunkType = bin.readString(4); if (chunkType === 'ANIM') { // Skip Background Color: 32 bits + Loop Count: 16 bits bin.pos += 4 + bin.readInt(4); // chunk size + chunk payload animation.ANIM = true; } else if (chunkType === 'ANMF') { if (!animation.ANIM) { this.onprogress = null; errorHandler(this.imgType + ': ANIM chunk not found!'); return; } i = frames.length; // Size of the Frame Data chunkSize = bin.readInt(4); // If the chunk size is odd, then a padding byte is added chunkSize += chunkSize & 1; // Remove the size of the ANMF properties listed below chunkSize -= 16; frames.push({ xOffset: bin.readInt(3) * 2, yOffset: bin.readInt(3) * 2, width: bin.readInt(3) + 1, height: bin.readInt(3) + 1, delay: bin.readInt(3), disposeOp: bin.readInt(1) & 1, data: '' }); bin._pos = bin.pos + chunkSize; while (bin.pos < bin._pos) { chunkType = bin.readString(4); chunkSize = bin.readInt(4); chunkSize += chunkSize & 1; // Should exist before the 'VP8 ' chunk only /*if (chunkType === 'ALPH') { if (bin.readString(4, bin.pos + chunkSize) === 'VP8 ') { // The whole ALPH chunk frames[i].data += bin.readString(8, bin.pos - 8) + bin.readString(chunkSize); } else { bin.pos += chunkSize; } } else */if (chunkType === 'VP8 ' || chunkType === 'VP8L') { // chunk type + chunk size + VP8? bitstream; frames[i].data += bin.readString(8, bin.pos - 8) + bin.readString(chunkSize); } else { bin.pos += chunkSize; } } // frames[i].data += bin.readString(chunkSize); } else { // Skip chunk bin.pos += 4 + bin.readInt(4); } } } if (frames.length > 1) { var generateImageSRC, wrap, speed, currentFrame; var img = new Image; var canvas = document.createElement('canvas'); var ctx = canvas.getContext('2d'); canvas.width = animation.width; canvas.height = animation.height; if (this.imgType === 'PNG') { chunkSize = bin.intToBytes(13); var imgEnd = bin.readString(12, bin.length - 12); generateImageSRC = function() { var frm = frames[frames.idx]; var _IHDR = 'IHDR' + bin.intToBytes(frm.width) + bin.intToBytes(frm.height) + IHDR; _IHDR += bin.intToBytes(crc32(_IHDR)); return 'data:image/png;base64,' + win.btoa( '\x89PNG\r\n\x1a\n' + chunkSize + _IHDR + imgHead + bin.intToBytes(frm.data.length - 4) + frm.data + bin.intToBytes(crc32(frm.data)) + imgEnd ); }; } else if (this.imgType === 'GIF') { chunkSize = bin.intToBytes(0, 2); chunkSize = ',' + chunkSize + chunkSize; generateImageSRC = function() { var frm = frames[frames.idx]; return 'data:image/gif;base64,' + win.btoa( 'GIF89a' + bin.intToBytes(frm.width, 2) + bin.intToBytes(frm.height, 2) + imgHead + frm.data + chunkSize + bin.readString(frm._data[0], frm._data[1]) + ';' ); }; } else if (this.imgType === 'WEBP') { generateImageSRC = function() { var frm = frames[frames.idx]; return 'data:image/webp;base64,' + win.btoa( 'RIFF' + bin.intToBytes(frm.data.length + 4) + 'WEBP' + frm.data ); }; } img.onerror = function() { wrap.textContent = xhr.imgType + ': frame (' + (frames.idx + 1) + ") couldn't be parsed!"; wrap.appendChild(this); }; img.onload = function() { if (drawFullFrame) { var frame = frames[frames.idx]; var prev = frames[frames.idx - 1]; if (prev) { if (prev.disposeOp === 1) { ctx.clearRect( prev.xOffset, prev.yOffset, prev.width, prev.height ); } else if (prev.disposeOp === 2) { ctx.putImageData( this.prevDisposeData, prev.xOffset, prev.yOffset ); } } if (frame.disposeOp === 2) { this.prevDisposeData = ctx.getImageData( frame.xOffset, frame.yOffset, frame.width, frame.height ); } // only for PNG if (frame.blendOp === 0) { ctx.clearRect( frame.xOffset, frame.yOffset, frame.width, frame.height ); } ctx.drawImage( this, frame.xOffset, frame.yOffset ); } var c = canvas.cloneNode(false); if (drawFullFrame) { c.getContext('2d').putImageData( ctx.getImageData(0, 0, canvas.width, canvas.height), 0, 0 ); } else { c.width = this.width; c.height = this.height; c.getContext('2d').drawImage(this, 0, 0); } wrap.appendChild(c); if (c.previousElementSibling) { c.previousElementSibling.style.display = ''; ++currentFrame.value; } c.style.display = 'inline-block'; this.removeAttribute('src'); ++frames.idx; processNextFrame(); }; var processNextFrame = function() { if (frames.idx < frames.length) { img.src = generateImageSRC(); frames[frames.idx].data = null; } else { img.onload = null; img = null; done(); errorHandler(null); } }; var done = function() { wrap.current = 0; wrap.children[wrap.children.length - 1].style.display = ''; wrap.children[wrap.current].style.display = 'inline-block'; currentFrame.value = 1; currentFrame.oninput = function() { if (parseFloat(speed.value, 10) !== 0) { wrap.stop(); } if (wrap.classList.contains('showall')) { wrap.onmouseup({button: 0}); } wrap.step(null); }; speed.oninput = function() { if (parseFloat(speed.value, 10) === 0) { wrap.stop(); wrap.addEventListener(browser['wheel'], wrap.wheeler, false); } else { wrap.classList.remove('showall'); wrap.removeEventListener(browser['wheel'], wrap.wheeler, false); wrap.animate(); } }; wrap.wheeler = function(e) { wrap.step((e.deltaY || -e.wheelDelta) > 0); e.preventDefault(); }; wrap.addEventListener(browser['wheel'], wrap.wheeler, false); currentFrame.addEventListener(browser['wheel'], wrap.wheeler, false); wrap.onmouseup = function(e) { if (e.button !== 0) { return; } if (e.ctrlKey) { if (e.target.toDataURL && speed.value < 1) { var img = new Image; img.src = e.target.toDataURL(); this.replaceChild(img, e.target); wrap.step(null); } return; } this.stop(); if (this.classList.contains('showall')) { if (e.target && e.target.parentNode === wrap) { currentFrame.value = [].indexOf.call(wrap.childNodes, e.target) + 1; wrap.step(null); } this.addEventListener(browser['wheel'], this.wheeler, false); } else { this.removeEventListener(browser['wheel'], this.wheeler, false); } this.classList.toggle('showall'); }; wrap.animate = function() { clearTimeout(wrap.timeout); wrap.step(parseFloat(speed.value, 10) < 0); if (parseFloat(speed.value, 10)) { wrap.timeout = setTimeout( wrap.animate, frames[wrap.current].delay / Math.abs(parseFloat(speed.value, 10) || 0) ); } }; wrap.stop = function() { clearTimeout(this.timeout); speed.value = 0; }; wrap.step = function(backward) { wrap.children[wrap.current].style.display = ''; if (backward === null) { wrap.current = Math.max( 1, Math.min(parseInt(currentFrame.value, 10) || 1, currentFrame.max) ) - 1; } else { if (backward) { --wrap.current; } else { ++wrap.current; } } if (wrap.current >= wrap.children.length) { wrap.current = 0; } else if (wrap.current < 0) { wrap.current = wrap.children.length - 1; } wrap.children[wrap.current].style.display = 'inline-block'; currentFrame.value = wrap.current + 1; currentFrame.nextElementSibling.value = currentFrame.value + ' / ' + frames.length; }; }; wrap = document.body; wrap.className = 'frames'; wrap.textContent = ''; buildNodes(wrap, [ {tag: 'a', attrs: {'class': 'back', href: win.location.href}, text: '\u2190'}, ' ', {tag: 'input', attrs: {type: 'number', id: 'speed', style: 'width: 55px; text-align: center;', value: 0, step: 0.5, min: -10, max: 10}}, 'x ', {tag: 'input', attrs: {type: 'range', id: 'currentFrame', style: 'width: 500px; vertical-align: middle;', size: 6, value: 1, step: 1, min: 1}}, ' ', {tag: 'output', attrs: {'for': 'currentFrame'}, text: '1 / ' + frames.length}, ' ', {tag: 'div', attrs: {id: 'frames'}} ]); wrap = $('frames'); speed = $('speed'); currentFrame = $('currentFrame'); currentFrame.max = frames.length; frames.idx = 0; processNextFrame(); } else { this.onprogress = null; errorHandler(this.imgType + ': not animated...'); } } }; xhr.onerror = function() { this.onprogress = null; errorHandler('Failed to load!'); }; xhr.open('GET', win.location.href, true); xhr.send(); /* global buildNodes, browser, Port, _ */ 'use strict'; var defaultPrefs; var inputChanges = {}; var $ = function(id) { return document.getElementById(id); }; var localizeNodes = function(nodes) { var els, l, args, attrs, attrnode, string; var i = nodes.length; while (i--) { if (nodes[i]._nodeLocalized) { continue; } els = nodes[i].querySelectorAll('[data-lng]'); l = els.length; while (l--) { string = _(els[l].dataset['lng']); attrs = els[l].dataset['lngattr']; if (attrs) { if (/^(title|placeholder)$/i.test(attrs)) { els[l][attrs] = string; } els[l].removeAttribute('data-lngattr'); } else { browser.insertHTML(els[l], string); } els[l].removeAttribute('data-lng'); if (els[l].dataset['lngargs'] === void 0) { continue; } args = els[l].dataset['lngargs'].split(' '); args.idx = args.length; while (args.idx--) { args[args.idx] = args[args.idx].split(':'); args[args.idx][0] = 'data-' + args[args.idx][0]; attrnode = els[l].querySelector('[' + args[args.idx][0] + ']'); if (!attrnode) { continue; } attrs = args[args.idx][1].split(','); attrs.idx = attrs.length; while (attrs.idx--) { if (!/^(href|style|target)$/i.test(attrs[attrs.idx])) { continue; } attrnode.setAttribute( attrs[attrs.idx], els[l].getAttribute(args[args.idx][0] + '-' + attrs[attrs.idx]) ); } } els[l].removeAttribute('data-lngargs'); } nodes[i]._nodeLocalized = true; } }; var changeColor = function(node, color, time) { clearTimeout(node.colorTransitionTimer); if (typeof color !== 'string') { node.style.color = ''; delete node.colorTransitionTimer; return; } node.style.color = color; node.colorTransitionTimer = setTimeout(function() { changeColor(node, null); }, time || 2000); }; var fillOutput = function(e) { e = e.target || e; var op = e.previousElementSibling; op.value = op.dataset['as_percent'] ? parseInt(e.value * 100, 10) : e.value; op.defaultValue = defaultPrefs[e.name]; }; var colorOnInput = function(e) { e = e.type === 'input' ? this : e; var c = /^#([\da-f]{3}){1,2}$/i.test(e.value) ? e.value : '#ffffff'; if (c.length === 4) { c = '#' + c[1] + c[1] + c[2] + c[2] + c[3] + c[3]; } e.previousElementSibling.value = c; }; var colorOnChange = function() { this.nextElementSibling.value = this.value; }; var setDefault = function(query) { if (!query) { return; } if (typeof query === 'string') { query = document.querySelectorAll(query); } else { query = [query]; } [].forEach.call(query, function(el) { if (el.type === 'checkbox') { el.checked = el.defaultChecked; } else if (/^SELECT/i.test(el.type)) { var i = el.length; while (i--) { if (el[i].hasAttribute('selected')) { el.selectedIndex = i; break; } } } else { el.value = el.defaultValue; if (el.type === 'range') { fillOutput(el); } } }); }; var load = function(prefs) { var m, field, fieldType, pref; var fields = document.querySelectorAll('[name]'); var i = fields.length; while (i--) { field = fields[i]; pref = field.name; if (field.disabled || field.readOnly || defaultPrefs[pref] === void 0) { continue; } fieldType = field.getAttribute('type') || 'text'; if (field.type !== fieldType) { fieldType = field.type; } if (fieldType === 'checkbox') { field.defaultChecked = defaultPrefs[pref]; pref = !!(prefs[pref] === void 0 ? defaultPrefs : prefs)[pref]; field.checked = field.defChecked = pref; } else { if (pref === 'sendTo') { if (!Array.isArray(prefs[pref])) { prefs[pref] = defaultPrefs[pref]; } field.rows = prefs[pref].length || 2; field.defaultValue = defaultPrefs[pref].join('\n'); prefs[pref] = prefs[pref].join('\n'); } else if (fieldType.slice(0, 6) === 'select') { [].some.call(field, function(el) { if (el.value == defaultPrefs[pref]) { el.defaultSelected = true; return true; } }); } else { field.defaultValue = defaultPrefs[pref]; } pref = (prefs[pref] === void 0 ? defaultPrefs : prefs)[pref]; field.value = field.defValue = pref; if (fieldType === 'range') { m = field.previousElementSibling; if (m && m.nodeName === 'OUTPUT') { fillOutput(field); } m = m.previousElementSibling; if (m && m.getAttribute('type') === 'color') { m.style.opacity = field.value; } field.addEventListener('change', fillOutput); } else if (fieldType === 'text' && field.previousElementSibling && field.previousElementSibling.getAttribute('type') === 'color') { field.addEventListener('input', colorOnInput); colorOnInput(field); field.previousElementSibling.addEventListener('change', colorOnChange); } } } }; var save = function() { var i, field, fieldType, pref; var fields = document.querySelectorAll('[name]'); var prefs = {}; for (i = 0; i < fields.length; ++i) { field = fields[i]; pref = field.name; if (field.disabled || field.readOnly || defaultPrefs[pref] === void 0) { continue; } fieldType = field.getAttribute('type'); if (fieldType === 'checkbox') { prefs[pref] = field.checked; } else if (fieldType === 'range' || fieldType === 'number' || field.classList.contains('number')) { prefs[pref] = parseFloat(field.value); if (field.min) { prefs[pref] = Math.max(field.min, Math.min(field.max, prefs[pref])); } if (typeof prefs[pref] !== 'number') { prefs[pref] = parseFloat(field.defaultValue); } field.value = prefs[pref]; } else { if (pref === 'sendTo') { prefs[pref] = field.value.trim().split(/[\r\n]+/).filter(Boolean); field.rows = prefs[pref].length || 2; } else { prefs[pref] = field.value; } } if (prefs[pref] === void 0) { prefs[pref] = defaultPrefs[pref]; } } Port.send({cmd: 'save', prefs: prefs}); }; var onHashChange = function() { var args = []; var menu = $('nav_menu'); var prevHash = menu && menu.active && menu.active.hash.slice(1) || 'general'; var hash = location.hash.slice(1) || 'general'; if (hash.indexOf('/') > -1) { args = hash.split('/'); hash = args.shift(); } var section = $(hash + '_sec'); if (!section._nodeLocalized) { if (hash === 'info') { if (args[0]) { args = args[0] === '0' ? 'app_installed' : 'app_updated'; $(args).style.display = 'block'; } var fillLocalesTable = function() { var alpha2, td2; var rows = []; var lngMap = function(el, idx) { el.name = [ el.name || el.fullname || '', el.fullname && el.name ? ' (' + el.fullname + ')' : '' ].join(''); if (!el.name) { el.name = el.email || el.web; } if (idx) { td2.nodes.push(', '); } td2.nodes.push(el.email || el.web ? { tag: 'a', attrs: {href: el.email ? 'mailto:' + el.email : el.web}, text: el.name } : el.name ); }; if (!_.locales) { _.locales = JSON.parse(this.responseText); this.onload = null; } for (alpha2 in _.locales) { // _ is the default language if (alpha2 === '_') { continue; } td2 = {tag: 'td'}; rows.push({tag: 'tr', nodes: [ { tag: 'td', attrs: _.locales[alpha2]['%'] ? {title: _.locales[alpha2]['%'] + '%'} : null, text: alpha2 + ', ' + _.locales[alpha2].name }, td2 ]}); if (_.locales[alpha2].translators) { td2.nodes = []; _.locales[alpha2].translators.forEach(lngMap); } else { td2.text = 'anonymous'; } } buildNodes($('locales_table'), rows); }; // It is already loaded in Safari if (_.locales) { fillLocalesTable(); } else { var xhr = new XMLHttpRequest; xhr.overrideMimeType('application/json;charset=utf-8'); xhr.open('GET', 'locales.jsn', true); xhr.onload = fillLocalesTable; xhr.send(); } } } if (prevHash !== hash && (prevHash = $(prevHash + '_sec'))) { prevHash.style.display = 'none'; } if (section) { localizeNodes([section]); section.style.display = 'block'; } if (menu.active) { menu.active.classList.remove('active'); } if (menu.active = menu.querySelector('a[href="#' + hash + '"]')) { menu.active.classList.add('active'); } }; window.addEventListener('hashchange', onHashChange); window.addEventListener('load', function() { ['opera', 'firefox', 'chrome', 'safari', 'maxthon'].some(function(el) { if (browser[el]) { document.body.classList.add(el); return true; } return false; }); var menu = $('nav_menu'); localizeNodes([menu, $('right_panel').firstElementChild]); var tmp = document.body.querySelector(".color_helper > input[type='text']"); if (tmp) { tmp.addEventListener('input', colorOnInput); colorOnInput(tmp); tmp.previousElementSibling.addEventListener('change', colorOnChange); } menu.addEventListener('click', function(e) { if (e.target.hash) { e.preventDefault(); location.hash = e.target.hash; } }); onHashChange(); document.forms[0].addEventListener('keydown', function(e) { e.stopPropagation(); if (e.which === 13) { e.target.formSaved = true; } if (e.repeat || !e.target.name || e.target.name.indexOf('key_') !== 0 || e.ctrlKey || e.altKey || e.metaKey || e.which < 47) { return; } e.preventDefault(); changeColor(e.target); var keys = { 96: '0', 97: '1', 98: '2', 99: '3', 100: '4', 101: '5', 102: '6', 103: '7', 104: '8', 105: '9', 106: '*', 107: '+', 109: '-', 110: '.', 111: '/', 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', 219: '[', 220: '\\', 221: ']', 222: "'", 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6', 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12' }; var key = keys[e.which] || String.fromCharCode(e.which).toUpperCase(); keys = document.body.querySelectorAll("input[name^='key_']"); for (var i = 0; i < keys.length; ++i) { if (keys[i].value.toUpperCase() !== key) { continue; } if (e.target !== keys[i]) { changeColor(e.target, 'red'); } return false; } e.target.value = key; document.forms[0].onchange(e); }); document.forms[0].addEventListener('contextmenu', function(e) { e.stopPropagation(); var t = e.target; if (t.classList.contains('checkbox')) { t = t.previousElementSibling; } if (!t.name) { return; } if (e.ctrlKey) { e.preventDefault(); setDefault(t); document.forms[0].onchange({target: t}); } }); // leave it callable document.forms[0].onchange = function(e) { if (e.stopPropagation) { e.stopPropagation(); } var defval, t = e.target; if (t.formSaved) { delete t.formSaved; } else if (t.parentNode.dataset['form'] || t.parentNode.parentNode.dataset['form']) { defval = 'default'; } else if (t.name.indexOf('_') > 0) { defval = 'def'; } if (!defval) { return; } if ((t.type === 'checkbox' && t[defval + 'Checked'] !== t.checked) // != is not a mistake || (t.type !== 'checkbox' && t[defval + 'Value'] != t.value)) { inputChanges[t.name] = true; } else { delete inputChanges[t.name]; } $('save_button').style.color = Object.keys(inputChanges).length ? '#e03c00' : ''; }; var resetButton = $('reset_button'); resetButton.reset = function() { delete resetButton.pending; resetButton.style.color = '#000'; }; resetButton.addEventListener('click', function(e) { if (resetButton.pending) { inputChanges['form_reset'] = true; clearTimeout(resetButton.pending); delete this.pending; resetButton.style.color = ''; resetButton.nextElementSibling.style.color = '#e03c00'; if (e.ctrlKey) { e.preventDefault(); e = (location.hash || '#general') + '_sec '; setDefault(e + 'input,' + e + 'select,' + e + 'textarea'); resetButton.style.color = 'lime'; } else { resetButton.style.color = 'green'; } resetButton.pending = setTimeout(resetButton.reset, 2000); return; } resetButton.style.color = 'orange'; resetButton.pending = setTimeout(resetButton.reset, 2000); e.preventDefault(); }); $('save_button').addEventListener('click', function(e) { e.preventDefault(); save(); changeColor(this, 'green'); changeColor(resetButton); }); [].forEach.call(document.body.querySelectorAll('.action_buttons') || [], function(el) { el.addEventListener('mousedown', function(e) { e.preventDefault(); }); }); Port.listen(function(data) { Port.listen(null); $('app_version').textContent = data.app.name + ' v' + data.app.version; var xhr = new XMLHttpRequest; xhr.overrideMimeType('application/json;charset=utf-8'); xhr.open('GET', 'defaults.jsn', true); xhr.onload = function() { defaultPrefs = JSON.parse(this.responseText); load(data.cfg); document.body.style.display = 'block'; }; xhr.send(); }); Port.send({cmd: 'load_prefs'}); }); ; @language cs, Czech (čeština) (100%) ; @translators jaramat (Jaroslav Matura) [lang] APP_DESCRIPTION=Vylepšuje práci s obrázky a videi ve vašem prohlížeči. NAV_GENERAL=Obecné NAV_INFO=O doplňku SHORTCUTS=Klávesové zkratky PH_CLICKFORSAMPLE=kliknutím zobrazíte příklady... DISABLED=zakázáno BUTTON_RESET=Výchozí nastavení BUTTON_SAVE=Uložit VW_MODE=Výchozí přiblížení VW_MODE_NATURL=původní velikost VW_MODE_AUTOFIT=přizpůsobit automaticky VW_MODE_FITWIDTH=roztáhnout na šířku VW_MODE_FITHEIGHT=roztáhnout na výšku VW_MODE_BESTFIT=roztáhnout automaticky VW_MINUPSCALE=Zvětšit malé obrázky VW_MINUPSCALE_TIP="Ve výchozím nastavení nebudou malé obrázky automaticky zvětšovány. Přeje-li si to, použijte tuto volbu.\nObrázky, které jsou větší než daný počet procent šířky nebo výšky okna prohlížeče (záleží na předchozí volbě) budou automaticky roztaženy." VW_IMGINFO=Vlastnosti obrázku VW_IMGINFO_TIP="V titulku stránky (v panelu prohlížeče) lze zobrazit tyto vlastnosti obrázku:\n%ow - původní šířka obrázku\n%oh - původní výška obrázku\n%ratio - poměr stran (šířka / výška)\n%w - současná šířka\n%h - současná výška\n%perc - procento zvětšení\n%url - úplná URL adresa\n%name - název souboru" VW_FAVICON=Vlastní ikona VW_FAVICON_TIP="Toto vám umožňuje nastavit vlastní ikonu, která se zobrazí vedle názvu panelu v prohlížeči.\nChcete-li jako ikonu použít obrázek samotný, použijte proměnnou %url." VW_WHEELZOOM=Použít kolečko myši jako lupu VW_LPDELAY=Prodleva dlouhého stisku VW_LPLEFT=Akce při dlouhém stisku levého tlačítka myši VW_LPRIGHT=Akce při dlouhém stisku pravého tlačítka myši VW_LPA_FITWH=roztáhnout na výšku/šířku VW_SC_CYCLE=Přepínat mezi režimy zvětšení: původní velikost, roztáhnout na šířku a roztáhnout na výšku VW_SC_DRAGNDROP=Držte Ctrl nebo Alt nebo začněte v pravé části obrázku, chcete-li obrázek přetáhnout jinam (např. mimo okno prohlížeče) VW_SC_RESET=Esc obnoví obrázek do původního stavu (pokud byl např. zvětšen, otočen nebo převrácen) nebo ukončí režim ručního zvětšení VW_SC_FREEZOOM=Shift + výběr myší pro vyvolání režimu ručního zvětšení (pro posunutí výběru držte Ctrl) SC_ZOOMINOUT=Přiblížit / oddálit SC_FLIPH=Překlopit vodorovně SC_FLIPV=Překlopit svisle SC_ROTL=Otočit vlevo SC_ROTR=Otočit vpravo SC_MORIG=Skutečná velikost SC_MFIT=Automaticky SC_MFITW=Roztáhnout na šířku SC_MFITH=Roztáhnout na výšku LANGUAGE=Jazyk TRANSLATIONS=Překlady TRANSLATIONS_TIP=Chcete-li se stát překladatelem, pošlete e-mail na tuto adresu a uveďte jazyky, kterými mluvíte. TRANSLATORS=Překladatelé VW_CENTER=Zarovnat na střed CUSTOM_CSS=Vlastní styl (CSS) CUSTOM_CSS_TIP="body {\n background: #f3f3f5; /* Změní pozadí stránky a obrázku (je-li průhledný). Lze použít všechny platné CSS hodnoty (color, url(), gradient...). */\n overflow: hidden; /* Skryje posuvníky. */\n}\n\nimg {\n background: #eef; /* Pozadí obrázku, je-li průhledný. */\n border: 10px solid white; /* Rám obrázku. */\n box-shadow: 0 0 10px grey; /* Stín pod obrázkem. */\n cursor: default !important; /* Vynutí výchozí kurzor (tzn. nezmění se na ručičku či lupu). */\n}\n\n.mask {\n color: rgba(0, 0, 0, .4); /* Barva krytí v režimu ručního zvětšení. */\n}\n\n#menu {\n display: none; /* Vypne zobrazování postranního panelu v levém horní rohu. */\n}\n" VW_SC_HORIZONTALSCROLL=Pro vodorovné posouvání obrázku kolečkem myši přesuňte kurzor do levé dolní části obrázku CUSTOM_CSS_PH="Zde můžete změnit barvu pozadí stránky nebo obrázku, rám, stín, chování posuvníků, skrýt postranní panel...\nPro zobrazení příkladů přejeďte kurzorem přes otazník vlevo. Přesné kódy barev získáte pomocí tlačítka pro výběr barev výše." VW_SC_FLOATMENU=Přesunutím kurzoru do levého horního rohu stránky vyvoláte postranní panel OPENER=Otevřít obrázek ze stránky OP_RIGHTLONG=dlouhý stisk pravého tlačítka OP_CTRLALTCLICK=Ctrl + Alt + pravé tlačítko OP_BOTH=obojí VW_VIDEO=Povolit pro videa VW_VIDATTRS=Vlastnosti videa VW_VIDATTRS_TIP="Lze použít tyto atributy:\nautoplay - přehrát video automaticky\nloop - přehrávat dokola\ncontrols - zobrazit ovládací prvky\nmuted - vypnout zvuk\nvolume=0-100 - výchozí hlasitost (v procentech)" SENDTO=Odeslat obrázek do... ; @language el, Greek (Ελληνικά) (66.67%) ; @translators Farow [lang] APP_DESCRIPTION=Additional functionality for the browser's default image and video viewer. NAV_GENERAL=General NAV_INFO=Πληροφορίες SHORTCUTS=Συντομεύσεις PH_CLICKFORSAMPLE=click for examples... DISABLED=απενεργοποιημένο BUTTON_RESET=Επαναφορά BUTTON_SAVE=Αποθήκευση VW_MODE=Αρχικό μεγέθος VW_MODE_NATURL=φυσικό μέγεθος VW_MODE_AUTOFIT=αυτόματη προσαρμογή VW_MODE_FITWIDTH=προσαρμογή στο πλάτος VW_MODE_FITHEIGHT=προσαρμογή στο ύψος VW_MODE_BESTFIT=βέλτιστη προσαρμογή VW_MINUPSCALE=Μεγέθυνση μικρών εικόνων VW_MINUPSCALE_TIP="Μικρές εικόνες δεν μεγεθύνονται. Αυτή η επιλογή τις αναγκάζει να μεγεθυνθούν.\nΗ τιμή είναι σε ποσοστό και μεγεθύνει τις εικόνες που είναι μεγαλύτερες από το επιλεγμένο ποσοστό του ύψους ή του πλάτους της οθόνης." VW_IMGINFO=Πληροφορίες εικόνας VW_IMGINFO_TIP="Display custom information in the title of the tab. It may contain the following variables:\n%ow - original width\n%oh - original height\n%ratio - current width / current height\n%w - current width\n%h - current height\n%perc - percent of the original size\n%url - full URL\n%name - filename" VW_FAVICON=Προσαρμοσμένο εικονίδιο VW_FAVICON_TIP="Η επιλογή αυτή ορίζει ένα εικονίδιο καρτέλας για την ανοιγμένη εικόνα.\nΗ διεύθυνση της εικόνας μπορεί να χρησιμοποιηθεί και ως μια μεταβλητή: %url" VW_WHEELZOOM=Μεγεύθυνση με τη ροδέλα του ποντικιού VW_LPDELAY=Καθυστέριση παρατετημένου πατήματος (ms) VW_LPLEFT=Λειτουργία παρατετημένου πατήματος αριστερού κουμπιού VW_LPRIGHT=Λειτουργία παρατετημένου πατήματος δεξιού κουμπιού VW_LPA_FITWH=προσαρμογή στο πλάτος/ύψος VW_SC_CYCLE=Εναλαγή μεταξύ μεγεθών: φυσικό, προσαρμογή στο πλάτος, προσαρμογή στο ύψος VW_SC_DRAGNDROP=Hold Ctrl or Alt to allow drag-and-drop, or drag from the right edge of the image, if that fits into the window VW_SC_RESET=To Esc θα επαναφέρει την εικόνα στην αρχική της μορφή ή θα κλείσει την ελεύθερη μεγέθυνση VW_SC_FREEZOOM=Shift + μεταφορά στην εικόνα για ελεύθερη μεγέθυνση, κρατήστε το Ctrl για να μετακινήσετε την επιλογή SC_ZOOMINOUT=Zoom in / out SC_FLIPH=Οριζόντια αναστροφή SC_FLIPV=Κάθετη αναστροφή SC_ROTL=Περιστροφή αριστερά SC_ROTR=Περιστροφή δεξιά SC_MORIG=Φυσικό μέγεθος SC_MFIT=Αυτόματη προσαρμογή SC_MFITW=Προσρμογή στο πλάτος SC_MFITH=Προσρμογή στο ύψος LANGUAGE=Γλώσσα TRANSLATIONS=Μεταφράσεις TRANSLATIONS_TIP=Εάν θέλεις να γίνεις μεταφραστής, τότε στείλε ένα e-mail σε αυτή τη διεύθυνση αναφέροντας τις γλώσσες ομιλείτε. TRANSLATORS=Μεταφραστές VW_CENTER=Center content CUSTOM_CSS=Προσαρμοσμένο στυλ CUSTOM_CSS_TIP="body {\n background: #f3f3f5; /* Any valid background property (color, url(), gradient...). */\n overflow: hidden; /* Hides the scrollbars. To show them, change \"hidden\" to \"auto\". */\n}\n\nimg {\n background: #eef; /* Different background for the image. */\n border: 10px solid white; /* Image border. */\n box-shadow: 0 0 10px grey; /* Shadow of the image. */\n cursor: default !important; /* Don't allow the mouse curosr to change. */\n}\n\n.mask {\n color: rgba(0, 0, 0, .4); /* Color of the free-zoom mask. */\n}\n\n#menu {\n display: none; /* Disable the floating menu. */\n}\n" VW_SC_HORIZONTALSCROLL=To scroll the image horizontally, use the mouse wheel over the left bottom edge CUSTOM_CSS_PH="Change the background color, image border/shadow, and hide the scrollbars or the floating menu... \nHover the question mark to see examples, use the color picker above for getting color codes." VW_SC_FLOATMENU=Move the cursor to the top left edge of the page to show the menu OPENER=Open images from regular web-pages OP_RIGHTLONG=right long-press OP_CTRLALTCLICK=Ctrl + Alt + right click OP_BOTH=both VW_VIDEO=Enable for videos VW_VIDATTRS=Video attributes VW_VIDATTRS_TIP="Acceptable attributes\nautoplay - video starts automatically\nloop - repeat the play\ncontrols - show player controls\nmuted - mute sound\nvolume=0-100 - default volume (percent)" SENDTO=Αποστολή εικόνας προς... ; @language en, English (100%) ; @translators Deathamns [lang] APP_DESCRIPTION=Additional functionality for the browser's default image and video viewer. NAV_GENERAL=General NAV_INFO=Info SHORTCUTS=Shortcuts PH_CLICKFORSAMPLE=click for examples... DISABLED=disabled BUTTON_RESET=Default BUTTON_SAVE=Save VW_MODE=Initial sizing mode VW_MODE_NATURL=natural size VW_MODE_AUTOFIT=contain VW_MODE_FITWIDTH=fit to width VW_MODE_FITHEIGHT=fit to height VW_MODE_BESTFIT=best fit VW_MINUPSCALE=Enlarge small images VW_MINUPSCALE_TIP="Normally, smaller images won't be upscaled to the view-port. This option forces them to do so.\nThe value is given in percent, and tells the script to enlarge those images that are larger than the given percent of view-port's width or height (it depends on the previous option)." VW_IMGINFO=Image informations VW_IMGINFO_TIP="Display custom information in the title of the tab. It may contain the following variables:\n%ow - original width\n%oh - original height\n%ratio - current width / current height\n%w - current width\n%h - current height\n%perc - percent of the original size\n%url - full URL\n%name - filename" VW_FAVICON=Custom favicon VW_FAVICON_TIP="This option allows to set a custom tab-icon for the opened image.\nThe address of the image can be used as a variable: %url" VW_WHEELZOOM=Zoom with mouse wheel VW_LPDELAY=Long-press delay (ms) VW_LPLEFT=Left long-press action VW_LPRIGHT=Right long-press action VW_LPA_FITWH=fit to width/height VW_SC_CYCLE=Cycle through sizing modes: natural, fit to width, fit to height VW_SC_DRAGNDROP=Hold Ctrl or Alt to allow drag-and-drop, or drag from the right edge of the image, if that fits into the window VW_SC_RESET=Esc will reset the image to its original form, or quits from free-zoom VW_SC_FREEZOOM=Shift + drag on the image to use free-zoom, hold Ctrl to move the selection SC_ZOOMINOUT=Zoom in / out SC_FLIPH=Flip horizontal SC_FLIPV=Flip vertical SC_ROTL=Rotate left SC_ROTR=Rotate right SC_MORIG=Natural size SC_MFIT=Auto fit SC_MFITW=Fit to width SC_MFITH=Fit to height LANGUAGE=Language TRANSLATIONS=Translations TRANSLATIONS_TIP=If you want to become a translator, then send an e-mail to this address mentioning your spoken languages. TRANSLATORS=Translators VW_CENTER=Center content CUSTOM_CSS=Custom style (CSS) CUSTOM_CSS_TIP="body {\n background: #f3f3f5; /* Any valid background property (color, url(), gradient...). */\n overflow: hidden; /* Hides the scrollbars. To show them, change \"hidden\" to \"auto\". */\n}\n\nimg {\n background: #eef; /* Different background for the image. */\n border: 10px solid white; /* Image border. */\n box-shadow: 0 0 10px grey; /* Shadow of the image. */\n cursor: default !important; /* Don't allow the mouse curosr to change. */\n}\n\n.mask {\n color: rgba(0, 0, 0, .4); /* Color of the free-zoom mask. */\n}\n\n#menu {\n display: none; /* Disable the floating menu. */\n}\n" VW_SC_HORIZONTALSCROLL=To scroll the image horizontally, use the mouse wheel over the left bottom edge CUSTOM_CSS_PH="Change the background color, image border/shadow, and hide the scrollbars or the floating menu... \nHover the question mark to see examples, use the color picker above for getting color codes." VW_SC_FLOATMENU=Move the cursor to the top left edge of the page to show the menu OPENER=Open images from regular web-pages OP_RIGHTLONG=right long-press OP_CTRLALTCLICK=Ctrl + Alt + right click OP_BOTH=both VW_VIDEO=Enable for videos VW_VIDATTRS=Video attributes VW_VIDATTRS_TIP="Acceptable attributes\nautoplay - video starts automatically\nloop - repeat the play\ncontrols - show player controls\nmuted - mute sound\nvolume=0-100 - default volume (percent)" SENDTO=Send image to... ; @language es, Spanish (español) (100%) ; @translators DurianZheitk (Javier Vera) [lang] APP_DESCRIPTION=Funciones adicionales para el visor de imágenes y vídeo del navegador. NAV_GENERAL=General NAV_INFO=Información SHORTCUTS=Atajos PH_CLICKFORSAMPLE=haz clic para mostrar ejemplos... DISABLED=deshabilitado BUTTON_RESET=Predeterminado BUTTON_SAVE=Guardar VW_MODE=Modo inicial de escalado VW_MODE_NATURL=tamaño original VW_MODE_AUTOFIT=ajustar VW_MODE_FITWIDTH=ajustar solo a lo ancho VW_MODE_FITHEIGHT=ajustar solo a lo alto VW_MODE_BESTFIT=mejor ajuste VW_MINUPSCALE=Ampliar imágenes pequeñas VW_MINUPSCALE_TIP="Por defecto, las imágenes pequeñas no serán ampliadas para encajar en la ventana de visualización. Esta opción las fuerza a hacerlo.\nEl valor esta dado en porcentaje, e indica a la extensión que amplié las imágenes que sean mayores al porcentaje en anchura o altura de la ventana de visualización (esto depende de la opción anterior).\n Ejemplo: si el valor esta fijado en 20%, y una imagen ocupa el 30% de la ventana de visualización, será ampliada de acuerdo a la opción anterior (Modo inicial de escalado)." VW_IMGINFO=Información de la imagen VW_IMGINFO_TIP="Muestra información sobre el contenido en el título de la pestaña. Puede contener las siguientes variables:\n%ow - anchura original\n%oh - altura original\n%ratio - anchura actual / altura actual\n%w - anchura actual\n%h - altura actual\n%perc - porcentaje del tamaño original\n%url - dirección URL\n%name - nombre del archivo" VW_FAVICON=Icono personalizado VW_FAVICON_TIP="Esta opción permite establecer un favicono personalizado para las pestañas con imágenes abiertas.\nLa dirección de la imagen puede ser usada como variable: %url" VW_WHEELZOOM=Ampliar (zoom) con la rueda del ratón VW_LPDELAY=Retraso para activar una pulsación larga (ms) VW_LPLEFT=Acción para una pulsación larga con el botón izquierdo VW_LPRIGHT=Acción para una pulsación larga con el botón derecho VW_LPA_FITWH=ajustar a la anchura/altura VW_SC_CYCLE=Cambiar entre los modos de escalado: tamaño original, ajustar a la anchura, ajustar a la altura VW_SC_DRAGNDROP=Mantén presionado Ctrl o Alt para permitir arrastrar y soltar, o arrastra desde el borde derecho de la imagen (si cabe en la ventana) VW_SC_RESET=Esc devolverá la imagen a su forma original, o saldrá del modo de ampliación de selección VW_SC_FREEZOOM=Shift + arrastrar sobre la imagen para usar el modo de ampliación de selección, mantén presionado Ctrl (sin soltar Shift) para mover la selección SC_ZOOMINOUT=Acercar/alejar la imagen SC_FLIPH=Voltear horizontalmente SC_FLIPV=Voltear verticalmente SC_ROTL=Girar a la izquierda SC_ROTR=Girar a la derecha SC_MORIG=Tamaño original SC_MFIT=Ajuste automático SC_MFITW=Ajustar a lo ancho SC_MFITH=Ajustar a lo alto LANGUAGE=Idioma TRANSLATIONS=Traducciones TRANSLATIONS_TIP=Si quieres ayudar en la traducción de la extensión, envía un e-mail a esta dirección mencionando los idiomas que dominas. TRANSLATORS=Traductores VW_CENTER=Centrar el contenido CUSTOM_CSS=Estilo personalizado (CSS) CUSTOM_CSS_TIP="body {\n background: #f3f3f5; /* Cualquier atributo válido para background (color, url(), gradient...). */\n overflow: hidden; /* Oculta las barras de desplazamiento. Para mostrarlas, cambia \"hidden\" por \"auto\". */\n}\n\nimg {\n background: #eef; /* Cambia el fondo de la imagen. */\n border: 10px solid white; /* Borde de la imagen. */\n box-shadow: 0 0 10px grey; /* Sombra de la imagen. */\n cursor: default !important; /* No permite que el puntero cambie. */\n}\n\n.mask {\n color: rgba(0, 0, 0, .4); /* Color para el modo de ampliación de selección. */\n}\n\n#menu {\n display: none; /* Deshabilita el menú flotante. */\n}\n" VW_SC_HORIZONTALSCROLL=Para desplazar la imagen horizontalmente, utiliza la rueda del ratón sobre el borde inferior izquierdo CUSTOM_CSS_PH="Cambia el color de fondo, bordes/sombras de la imagen, y esconde las barras de desplazamiento o el menú flotante.\nColoca el cursor sobre el signo de interrogación a la izquierda para ver ejemplos. Utiliza el selector de color (arriba a la derecha) para obtener códigos de color." VW_SC_FLOATMENU=Mueve el cursor a la esquina superior izquierda de la pantalla para mostrar el menú OPENER=Abrir imágenes desde páginas web OP_RIGHTLONG=una pulsación larga con el botón derecho OP_CTRLALTCLICK=Ctrl + Alt + clic derecho OP_BOTH=ambas VW_VIDEO=Habilitar para videos VW_VIDATTRS=Atributos de video VW_VIDATTRS_TIP="Atributos aceptados\nautoplay - comenzar reproducción automáticamente\nloop - repetir la reproducción\ncontrols - mostrar los controles del reproductor\nmuted - sin sonido\nvolume=0-100 - volumen por defecto (porcentaje)" SENDTO=Enviar imagen a... ; @language fi, Finnish (suomi) (61.4%) ; @translators Opeeera [lang] APP_DESCRIPTION=Additional functionality for the browser's default image and video viewer. NAV_GENERAL=General NAV_INFO=Tietoja SHORTCUTS=Näppäinoikotiet PH_CLICKFORSAMPLE=klikkaa nähdäksesi esimerkkejä... DISABLED=poissa käytöstä BUTTON_RESET=Palauta oletukset BUTTON_SAVE=Tallenna VW_MODE=Oletuskoko VW_MODE_NATURL=luonnollinen koko VW_MODE_AUTOFIT=automaattinen sovitus VW_MODE_FITWIDTH=sovita leveyteen VW_MODE_FITHEIGHT=sovita korkeuteen VW_MODE_BESTFIT=paras sovitus VW_MINUPSCALE=Suurenna pieniä kuvia (%) VW_MINUPSCALE_TIP="Tavallisesti pieniä kuvia ei skaalata näkymäalueeseen, mutta tämä asetus pakottaa sen päälle.\nArvo annetaan prosentteina, ja se saa skriptin suurentamaan kuvia, jotka ovat suurempia kuin annettu prosenttiosuus näkymäalueen leveydestä tai korkeudesta (riippuen edellisestä asetuksesta)." VW_IMGINFO=Kuvan tiedot VW_IMGINFO_TIP="Display custom information in the title of the tab. It may contain the following variables:\n%ow - original width\n%oh - original height\n%ratio - current width / current height\n%w - current width\n%h - current height\n%perc - percent of the original size\n%url - full URL\n%name - filename" VW_FAVICON=Oma kuvake VW_FAVICON_TIP="This option allows to set a custom tab-icon for the opened image.\nThe address of the image can be used as a variable: %url" VW_WHEELZOOM=Suurennus hiiren rullalla VW_LPDELAY=Pitkän hiiren painalluksen viive (ms) VW_LPLEFT=Ykköspainikkeen pitkän painalluksen toiminto VW_LPRIGHT=Kakkospainikkeen pitkän painalluksen toiminto VW_LPA_FITWH=sovita leveyteen tai korkeuteen VW_SC_CYCLE=Siirry suurennustilojen välillä: luonnollinen koko, sovita leveyteen, sovita korkeuteen VW_SC_DRAGNDROP=Hold Ctrl or Alt to allow drag-and-drop, or drag from the right edge of the image, if that fits into the window VW_SC_RESET=Esc palauttaa kuvan alkuperäiseen tilaan tai poistuu FreeZoom-tilasta VW_SC_FREEZOOM=Pidä Vaihtoa pohjassa ja vedä kuvan päällä käyttääksesi FreeZoomia, pidä Ctrl:ia pohjassa siirtääksesi valittua aluetta SC_ZOOMINOUT=Suurenna / pienennä SC_FLIPH=Käännä pystysuunnassa SC_FLIPV=Käännä vaakasuunnassa SC_ROTL=Kierrä vasemmalle SC_ROTR=Kierrä oikealle SC_MORIG=Luonnollinen koko SC_MFIT=Automaattinen sovitus SC_MFITW=Sovita leveyteen SC_MFITH=Sovita korkeuteen LANGUAGE=Kieli TRANSLATIONS=Translations TRANSLATIONS_TIP=If you want to become a translator, then send an e-mail to this address mentioning your spoken languages. TRANSLATORS=Translators VW_CENTER=Center content CUSTOM_CSS=Custom style (CSS) CUSTOM_CSS_TIP="body {\n background: #f3f3f5; /* Any valid background property (color, url(), gradient...). */\n overflow: hidden; /* Hides the scrollbars. To show them, change \"hidden\" to \"auto\". */\n}\n\nimg {\n background: #eef; /* Different background for the image. */\n border: 10px solid white; /* Image border. */\n box-shadow: 0 0 10px grey; /* Shadow of the image. */\n cursor: default !important; /* Don't allow the mouse curosr to change. */\n}\n\n.mask {\n color: rgba(0, 0, 0, .4); /* Color of the free-zoom mask. */\n}\n\n#menu {\n display: none; /* Disable the floating menu. */\n}\n" VW_SC_HORIZONTALSCROLL=To scroll the image horizontally, use the mouse wheel over the left bottom edge CUSTOM_CSS_PH="Change the background color, image border/shadow, and hide the scrollbars or the floating menu... \nHover the question mark to see examples, use the color picker above for getting color codes." VW_SC_FLOATMENU=Move the cursor to the top left edge of the page to show the menu OPENER=Open images from regular web-pages OP_RIGHTLONG=right long-press OP_CTRLALTCLICK=Ctrl + Alt + right click OP_BOTH=both VW_VIDEO=Enable for videos VW_VIDATTRS=Video attributes VW_VIDATTRS_TIP="Acceptable attributes\nautoplay - video starts automatically\nloop - repeat the play\ncontrols - show player controls\nmuted - mute sound\nvolume=0-100 - default volume (percent)" SENDTO=Lähetä kuvan osoite... ; @language fr, French (français) (91.23%) ; @translators Tmnath [lang] APP_DESCRIPTION=Des fonctionnalités additionnelles pour l’affichage des images et des vidéos de votre navigateur. NAV_GENERAL=General NAV_INFO=Infos SHORTCUTS=Raccourcis PH_CLICKFORSAMPLE=cliquez pour avoir un exemple... DISABLED=désactivé BUTTON_RESET=Par défaut BUTTON_SAVE=Sauvegarder VW_MODE=Redimensionnement VW_MODE_NATURL=taille initiale VW_MODE_AUTOFIT=réduire VW_MODE_FITWIDTH=adapter à la largeur VW_MODE_FITHEIGHT=adapter à la hauteur VW_MODE_BESTFIT=taille optimale VW_MINUPSCALE=Agrandir les petites images VW_MINUPSCALE_TIP="En temps normal, les petites images ne sont pas élargies à la taille de la fenêtre. Cette option les y force.\nLa valeur est un pourcentage, et indique au script d'élargir les images plus grandes qu'un certain pourcentage de la hauteur ou de la largeur de la fenêtre (en fonction de l'option choisie précédemment)." VW_IMGINFO=Détails de l'image VW_IMGINFO_TIP="Display custom information in the title of the tab. It may contain the following variables:\n%ow - original width\n%oh - original height\n%ratio - current width / current height\n%w - current width\n%h - current height\n%perc - percent of the original size\n%url - full URL\n%name - filename" VW_FAVICON=Favicon personnalisé VW_FAVICON_TIP="Cette option permet de choisir un icône personnalisé pour l'onglet de l'image ouverte.\nL'adresse de l'image peut être utilisée comme une variable : %url" VW_WHEELZOOM=Zoomer avec la molette VW_LPDELAY=Durée du clic prolongé (ms) VW_LPLEFT=Clic gauche prolongé VW_LPRIGHT=Clic droit prolongé VW_LPA_FITWH=adapter à la largeur/hauteur VW_SC_CYCLE=Faire défiler les différents modes : taille initiale, adapter à la largeur, adapter à la hauteur VW_SC_DRAGNDROP=Hold Ctrl or Alt to allow drag-and-drop, or drag from the right edge of the image, if that fits into the window VW_SC_RESET=Échap ramènera l'image à sa taille initiale, ou sortira du zoom libre VW_SC_FREEZOOM=Maj + glisser sur l'image pour utiliser le zoom libre, maintenir Ctrl pour déplacer la sélection SC_ZOOMINOUT=Zoom avant / arrière SC_FLIPH=Inverser horizontalement SC_FLIPV=Inverser verticalement SC_ROTL=Rotation vers la gauche SC_ROTR=Rotation vers la droite SC_MORIG=Taille initiale SC_MFIT=Redimensionnement automatique SC_MFITW=Adapter à la largeur SC_MFITH=Adapter à la hauteur LANGUAGE=Langue TRANSLATIONS=Traductions TRANSLATIONS_TIP=Si vous souhaitez devenir un traducteur, envoyez-moi un mail à cette adresse en indiquant les langues que vous parlez. TRANSLATORS=Traducteurs VW_CENTER=Centrer le contenu CUSTOM_CSS=Style personnalisé (CSS) CUSTOM_CSS_TIP="body {\n background: #f3f3f5; /* Any valid background property (color, url(), gradient...). */\n overflow: hidden; /* Hides the scrollbars. To show them, change \"hidden\" to \"auto\". */\n}\n\nimg {\n background: #eef; /* Different background for the image. */\n border: 10px solid white; /* Image border. */\n box-shadow: 0 0 10px grey; /* Shadow of the image. */\n cursor: default !important; /* Don't allow the mouse curosr to change. */\n}\n\n.mask {\n color: rgba(0, 0, 0, .4); /* Color of the free-zoom mask. */\n}\n\n#menu {\n display: none; /* Disable the floating menu. */\n}\n" VW_SC_HORIZONTALSCROLL=Pour faire défiler l'image horizontalement, utilisez la molette de la souris en bas à gauche CUSTOM_CSS_PH="Change the background color, image border/shadow, and hide the scrollbars or the floating menu... \nHover the question mark to see examples, use the color picker above for getting color codes." VW_SC_FLOATMENU=Déplacez le curseur en haut à gauche de la page pour afficher le menu OPENER=Ouvre les images des pages web classiques OP_RIGHTLONG=clic droit prolongé OP_CTRLALTCLICK=Ctrl + Alt + clic droit OP_BOTH=les deux VW_VIDEO=Activer l'extension pour les vidéos VW_VIDATTRS=Options des vidéos VW_VIDATTRS_TIP="Options possibles\nautoplay - la vidéo se lance automatiquement\nloop - répéter la vidéo\ncontrols - montrer les boutons du lecteur\nmuted - rendre muet\nvolume=0-100 - volume par défaut (en pourcentage)" SENDTO=Envoyer l'image vers... ; @language hu, Hungarian (magyar) (100%) ; @translators Deathamns [lang] APP_DESCRIPTION=A beépített kép- illetve videónéző funkcióit bővíti. NAV_GENERAL=Beállítások NAV_INFO=Infó SHORTCUTS=Billentyűparancsok PH_CLICKFORSAMPLE=kattints példákért... DISABLED=kikapcsolva BUTTON_RESET=Alap BUTTON_SAVE=Mentés VW_MODE=Alap méretezés VW_MODE_NATURL=eredeti méret VW_MODE_AUTOFIT=ablakhoz méretez VW_MODE_FITWIDTH=szélességhez méretez VW_MODE_FITHEIGHT=magassághoz méretez VW_MODE_BESTFIT=illeszkedés az ablakhoz VW_MINUPSCALE=Kis képek nagyítása VW_MINUPSCALE_TIP="A kisebb képek alapból nem méreteződnek az ablakhoz. Ez a beállítás az ellenkezőjére kényszeríti őket.\nAzok a képek méreteződnek fel, amelyek méretei nagyobbak, mint a százalékban megadott ablak szélessége vagy magassága (az előző beállítástól függ)." VW_IMGINFO=Képinformációk VW_IMGINFO_TIP="Egyéni adatok megjelenítése a fül címében, a következő változók felhaszanálásával:\n%ow - eredeti szélesség\n%oh - eredeti magasság\n%ratio - jelenlegi szélesség és magasság aránya\n%w - jelenlegi szélesség\n%h - jelenlegi magasság\n%perc - átméretezés százalékban\n%url - teljes cím\n%name - fájl neve" VW_FAVICON=Egyéni ikon a fülön VW_FAVICON_TIP=A kép címe használható változóként a megadott értékben: %url VW_WHEELZOOM=Nagyítás görgetéssel VW_LPDELAY=Egérgomb hosszan-tartás ideje (ms) VW_LPLEFT=Bal hosszan-tartás funkciója VW_LPRIGHT=Jobb hosszan-tartás funkciója VW_LPA_FITWH=szélességhez/magassághoz méretez VW_SC_CYCLE=Méretezések közti váltás: eredeti, szélességhez-, magassághoz méretez VW_SC_DRAGNDROP=Ctrl vagy Alt nyomva-tartásával vonszolható a kép, vagy ha belefér a nézetablakba, akkor a jobb szélénél fogva VW_SC_RESET=Esc a képet az eredeti állapotára állítja, vagy kilép a szabad méretezésből VW_SC_FREEZOOM=Shift + vonszolás nagyít a kijelölt részre, Ctrl tartásával a kijelölés mozgatható SC_ZOOMINOUT=Nagyítás / kicsinyítés SC_FLIPH=Vízszintes tükrözés SC_FLIPV=Függőleges tükrözés SC_ROTL=Forgatás jobbra SC_ROTR=Forgatás balra SC_MORIG=Eredeti méret SC_MFIT=Ablakhoz méretez SC_MFITW=Szélességhez méretez SC_MFITH=Magassághoz méretez LANGUAGE=Nyelv TRANSLATIONS=Fordítások TRANSLATIONS_TIP=Ha szeretnél fordító lenni, ezen az e-mail címen lehet jelentkezni, az általad beszélt nyelvek megemlítésével. TRANSLATORS=Fordítók VW_CENTER=Tartalom középre helyezése CUSTOM_CSS=Egyedi stílus (CSS) CUSTOM_CSS_TIP="body {\n background: #f3f3f5; /* Bármilyen elfogadott background érték (szín, url(), színátmenet...). */\n overflow: hidden; /* Elrejti a görgősávot. \"hidden\" változtatása \"auto\"-ra a megjelenítésükhöz. */\n}\n\nimg {\n background: #eef; /* Más háttér kizárólag a képnek. */\n border: 10px solid white; /* Egyéni képkeret. */\n box-shadow: 0 0 10px grey; /* Kép körüli árnyék. */\n cursor: default !important; /* Az egérkurzor változatlan marad ezzel az értékkel. */\n}\n\n.mask {\n color: rgba(0, 0, 0, .4); /* A szabad méretezés mask színe. */\n}\n\n#menu {\n display: none; /* A lebegő menü elrejtése. */\n}\n" VW_SC_HORIZONTALSCROLL=A kép vízszintes mozgatása az oldal bal also élén való görgetéssel lehetséges. CUSTOM_CSS_PH="Itt lehetseéges a háttér színének, kép keretének/árnyékának, stb. beállítása, illetve a görgősávok és a lebegő menü elrejtése. \nPéldákért vidd az egérkurzort a kérdőjel fölé, a színkódokhoz pedig használd a fenti színválasztót." VW_SC_FLOATMENU=A menü megjelenítéséhez mozgasd az egérkurzort az oldal bel felső szélére OPENER=Képek megnyitása normál web-oldalkról OP_RIGHTLONG=jobb klikk hosszan-tartva OP_CTRLALTCLICK=Ctrl + Alt + jobb klikk OP_BOTH=mindkettő VW_VIDEO=Aktív videofájlokon is VW_VIDATTRS=Videó attribútumok VW_VIDATTRS_TIP="Használható attribútumok\nautoplay - automatikus indítás\nloop - lejátszás ismétlése\ncontrols - lejátszógombok megjelenítése\nmuted - hang némítása\nvolume=0-100 - alapértelmezett hangerő (százalék)" SENDTO=Kép küldése... ; @language ko, Korean (한국어) (100%) ; @translators QbsidianH20 (유태종) [lang] APP_DESCRIPTION=브라우저의 기본 이미지와 비디오 뷰어에 여러 기능을 추가해줍니다. NAV_GENERAL=기본 NAV_INFO=정보 SHORTCUTS=바로가기 PH_CLICKFORSAMPLE=예시를 보려면 클릭... DISABLED=비활성화됨 BUTTON_RESET=기본 BUTTON_SAVE=저장 VW_MODE=초기 크기 조절 모드 VW_MODE_NATURL=자연스럽게 VW_MODE_AUTOFIT=포함 VW_MODE_FITWIDTH=폭 맞춤 VW_MODE_FITHEIGHT=높이 맞춤 VW_MODE_BESTFIT=최적 VW_MINUPSCALE=작은 이미지를 확대 VW_MINUPSCALE_TIP="보통 작은 이미지는 표시 영역에 맞춰 확대되지 않지만 이 옵션은 이것을 강제합니다.\n 이 값은 퍼센트로 되어 있습니다. 이전 옵션에 따라 표시 영역의 폭이나 높이의 퍼센트보다 큰 이미지는 표시 영역에 맞춰 확대됩니다." VW_IMGINFO=이미지 정보 VW_IMGINFO_TIP="커스텀 정보를 탭의 제목에 표시합니다. 아래의 변수를 포함할 수 있습니다:\n%ow - 실제 폭\n%oh - 실제 높이\n%ratio - 현재 폭 / 현재 높이\n%w - 현재 폭\n%h - 현재 높이\n%perc - 실제 크기에 대한 퍼센트\n%url - 전체 URL\n%name - 파일명" VW_FAVICON=커스텀 파비콘 VW_FAVICON_TIP="이 옵션으로 이미지가 열린 탭의 아이콘을 바꿀 수 있습니다.\n이미지 주소가 변수로서 쓰일 수 있습니다:\n%url" VW_WHEELZOOM=마우스 휠로 확대 / 축소 VW_LPDELAY=길게 누르기 지연시간 (ms) VW_LPLEFT=왼쪽 길게 누르기 작동 VW_LPRIGHT=오른쪽 길게 누르기 작동 VW_LPA_FITWH=폭/높이에 맞춤 VW_SC_CYCLE=크기 조절 모드를 차례로 순환: 자연스럽게, 폭 맞춤, 높이 맞춤 VW_SC_DRAGNDROP=끌어서 놓기를 허용하려면 Ctrl 또는 Alt를 누르고 있거나, 창과 맞다면 이미지의 오른쪽 가장자리에서 끌면 됩니다 VW_SC_RESET=Esc는 이미지를 원래 모습으로 되돌리거나, 자유 확대 / 축소를 취소합니다 VW_SC_FREEZOOM=이미지 위에서 Shift + 끌기를 하여 자유 확대 / 축소를 하고, Ctrl을 누른 상태에서는 선택 영역을 이동할 수 있습니다 SC_ZOOMINOUT=확대 / 축소 SC_FLIPH=위아래 뒤집기 SC_FLIPV=좌우 뒤집기 SC_ROTL=시계 반대 방향 회전 SC_ROTR=시계 방향 회전 SC_MORIG=자연스러운 크기 SC_MFIT=자동 맞춤 SC_MFITW=폭 맞춤 SC_MFITH=높이 맞춤 LANGUAGE=언어 TRANSLATIONS=번역 TRANSLATIONS_TIP=번역자가 되고 싶다면, 이 주소로 번역 가능한 언어가 언급된 이메일을 보내주세요. TRANSLATORS=번역자 VW_CENTER=내용 가운데 정렬 CUSTOM_CSS=커스텀 스타일 (CSS) CUSTOM_CSS_TIP="body {\n background: #f3f3f5; /* 아무 유효한 배경 속성 (color, url(), gradient...) */\n overflow: hidden; /* 스크롤 바를 숨깁니다. 보이기 위해서는, \"hidden\"을 \"auto\"로 바꾸세요. */\n}\n\nimg {\n background: #eef; /* 이미지를 위한 배경 */\n border: 10px solid white; /* 이미지 테두리 */\n box-shadow: 0 0 10px grey; /* 이미지 그림자 */\n cursor: default !important; /* 마우스 커서의 모양이 변하지 않게 합니다. */\n}\n\n.mask {\n color: rgba(0, 0, 0, .4); /* 자유 확대 / 축소 마스크의 색상 */\n}\n\n#menu {\n display: none; /* 떠 있는 메뉴를 비활성화 */\n}\n" VW_SC_HORIZONTALSCROLL=큰 이미지를 좌우로 움직이려면 페이지 왼쪽 아래 모서리에서 마우스 휠을 사용하면 됩니다 CUSTOM_CSS_PH="배경 색 바꾸기, 이미지 테두리 / 그림자, 스크롤바 숨기기와 떠 있는 메뉴 등...\n위 색상 선택기를 사용하여 색상 코드를 얻을 수 있습니다. 예시를 보려면 물음표에 커서를 올리세요." VW_SC_FLOATMENU=메뉴를 표시하려면 커서를 페이지 왼쪽 위 모서리로 이동하세요 OPENER=일반 웹 페이지에서 이미지 열기 OP_RIGHTLONG=오른쪽 길게 누르기 OP_CTRLALTCLICK=Ctrl + Alt + 오른쪽 클릭 OP_BOTH=둘 다 VW_VIDEO=비디오에 대해 활성화 VW_VIDATTRS=비디오 속성 VW_VIDATTRS_TIP="사용 가능한 속성\n자동 재생 - 비디오가 자동으로 시작됨\n반복 재생 - 비디오를 반복하여 재생\n컨트롤 - 플레이어 컨트롤 표시\n조용히 - 소리 끄기\n볼륨=0-100 - 기본 볼륨 (퍼센트)" SENDTO=이미지를 다음으로 보내기... ; @language nl, Dutch (Nederlands) (70.18%) ; @translators Kaçkar [lang] APP_DESCRIPTION=Additional functionality for the browser's default image and video viewer. NAV_GENERAL=General NAV_INFO=Info SHORTCUTS=Snelkoppelingen PH_CLICKFORSAMPLE=klikken voor voorbeelden... DISABLED=uit BUTTON_RESET=Reset BUTTON_SAVE=Opslaan VW_MODE=Oorspronkelijke pas-modus VW_MODE_NATURL=natuurlijk formaat VW_MODE_AUTOFIT=bevatten VW_MODE_FITWIDTH=breedte passend maken VW_MODE_FITHEIGHT=hoogte passend maken VW_MODE_BESTFIT=best afstemmen VW_MINUPSCALE=Kleine afbeeldingen vergroten VW_MINUPSCALE_TIP="Normaal gesproken worden kleinere afbeeldingen niet vergroot. Deze optie dwingt afbeeldingen te vergroten.\nDe waarde is in procenten, en vertelt het script om afbeeldingen die groter zijn de gegeven procenten van de breedte of hoogte van de kijker te vergroten (afhankelijk van de vorige optie)." VW_IMGINFO=Afbeeldings informatie VW_IMGINFO_TIP="Display custom information in the title of the tab. It may contain the following variables:\n%ow - original width\n%oh - original height\n%ratio - current width / current height\n%w - current width\n%h - current height\n%perc - percent of the original size\n%url - full URL\n%name - filename" VW_FAVICON=Aangepaste favicon VW_FAVICON_TIP="Deze optie maakt het mogelijk om een aangepaste tab-icoon te gebruiken voor de geopende afbeelding.\nHet adres van de afbeelding kan gebruikt worden als variabele: %url" VW_WHEELZOOM=Zoomen met muiswiel VW_LPDELAY=Lange druk vertraging (ms) VW_LPLEFT=Linker lange druk aktie VW_LPRIGHT=Rechter lange druk aktie VW_LPA_FITWH=breedte/hoogte passend maken VW_SC_CYCLE=Door sizing modi wisselen: normaal, breedte passend maken, hoogte passend maken VW_SC_DRAGNDROP=Hold Ctrl or Alt to allow drag-and-drop, or drag from the right edge of the image, if that fits into the window VW_SC_RESET=Esc herstelt de afbeelding naar origineel formaat, of verlaat de vrije-zoom VW_SC_FREEZOOM=Shift + Sleep de afbeelding om free-zoom te gebruiken, Ctrl ingedrukt houden om de selectie te verplaatsen SC_ZOOMINOUT=In-/uitzoomen SC_FLIPH=Horizontaal omdraaien SC_FLIPV=Verticaal omdraaien SC_ROTL=Links roteren SC_ROTR=Rechts roteren SC_MORIG=Normale grootte SC_MFIT=Automatisch passen SC_MFITW=Breedte passend maken SC_MFITH=Hoogte passend maken LANGUAGE=Taal TRANSLATIONS=Vertalingen TRANSLATIONS_TIP=Wil je een vertaler worden, stuur dan een e-mail naar dit adres, vermeld je gesproken talen TRANSLATORS=Vertalers VW_CENTER=Center content CUSTOM_CSS=Aangepaste stijl (CSS) CUSTOM_CSS_TIP="body {\n background: #f3f3f5; /* Any valid background property (color, url(), gradient...). */\n overflow: hidden; /* Hides the scrollbars. To show them, change \"hidden\" to \"auto\". */\n}\n\nimg {\n background: #eef; /* Different background for the image. */\n border: 10px solid white; /* Image border. */\n box-shadow: 0 0 10px grey; /* Shadow of the image. */\n cursor: default !important; /* Don't allow the mouse curosr to change. */\n}\n\n.mask {\n color: rgba(0, 0, 0, .4); /* Color of the free-zoom mask. */\n}\n\n#menu {\n display: none; /* Disable the floating menu. */\n}\n" VW_SC_HORIZONTALSCROLL=To scroll the image horizontally, use the mouse wheel over the left bottom edge CUSTOM_CSS_PH="Change the background color, image border/shadow, and hide the scrollbars or the floating menu... \nHover the question mark to see examples, use the color picker above for getting color codes." VW_SC_FLOATMENU=Move the cursor to the top left edge of the page to show the menu OPENER=Open images from regular web-pages OP_RIGHTLONG=right long-press OP_CTRLALTCLICK=Ctrl + Alt + right click OP_BOTH=both VW_VIDEO=Enable for videos VW_VIDATTRS=Video attributes VW_VIDATTRS_TIP="Acceptable attributes\nautoplay - video starts automatically\nloop - repeat the play\ncontrols - show player controls\nmuted - mute sound\nvolume=0-100 - default volume (percent)" SENDTO=Afbeelding sturen naar... ; @language pl, Polish (polski) (100%) ; @translators pafflick (Paweł Pawlak) [http://www.pafflick.com/] [lang] APP_DESCRIPTION=Rozszerzenie standardowej przeglądarki obrazów i filmów o nowe funkcje. NAV_GENERAL=Ogólne NAV_INFO=Info SHORTCUTS=Skróty PH_CLICKFORSAMPLE=kliknij, by zobaczyć przykłady... DISABLED=brak BUTTON_RESET=Resetuj BUTTON_SAVE=Zapisz VW_MODE=Skalowanie obrazów VW_MODE_NATURL=rzeczywisty wymiar VW_MODE_AUTOFIT=zmieść na ekranie VW_MODE_FITWIDTH=dopasuj do szerokości VW_MODE_FITHEIGHT=dopasuj do wysokości VW_MODE_BESTFIT=automatyczne dopasowanie VW_MINUPSCALE=Powiększanie małych obrazków VW_MINUPSCALE_TIP="Domyślnie małe obrazki nie są powiększane do rozmiarów okna. Ta funkcja wymusza ich skalowanie.\nFunkcja ta powoduje powiększenie tych obrazków, których wymiary przekraczają określony procent wysokości lub szerokości okna (w zależności od ustawień poprzedniej funkcji)." VW_IMGINFO=Informacje o obrazku VW_IMGINFO_TIP="Wyświetlaj wybrane informacje o pliku w tytule karty przeglądarki. Lista możliwych opcji:\n%ow - rzeczywista szerokość\n%oh - rzeczywista wysokość\n%ratio - aktualna szerokość / aktualna wysokość\n%w - aktualna szerokość\n%h - aktualna wysokość\n%perc - procent powiększenia\n%url - pełny adres pliku\n%name - nazwa pliku" VW_FAVICON=Własna ikona pliku VW_FAVICON_TIP="Zmienia ikonę pliku w pasku tytułu (domyślnie przeglądarka używa obrazka jako ikony).\nAdres obrazka można wprowadzić za pomocą zmiennej: %url" VW_WHEELZOOM=Powiększaj za pomocą kółka myszki VW_LPDELAY=Opóźnienie długiego przytrzymania (ms) VW_LPLEFT=Funkcja dla przytrzymania lewego przycisku VW_LPRIGHT=Funkcja dla przytrzymania prawego przycisku VW_LPA_FITWH=zmieść w oknie VW_SC_CYCLE=Przełącza tryby powiększenia: rzeczywiste wymiary, zmieść w poziomie, zmieść w pionie VW_SC_DRAGNDROP=Przytrzymaj Ctrl lub Alt by włączyć tryb przeciągania i upuszczania, lub przeciągnij z prawej strony obrazka, jeśli mieści się w oknie przeglądarki VW_SC_RESET=Esc przywraca domyślne ustawienia obrazka lub opuszcza tryb powiększania wybranego obszaru VW_SC_FREEZOOM=Przeciągnij z Shiftem na obrazku, by aktywować powiększanie obszarowe. Przytrzymaj Ctrl aby przesunąć zaznaczenie SC_ZOOMINOUT=Powiększ / Pomniejsz SC_FLIPH=Odbij w poziomie SC_FLIPV=Odbij w pionie SC_ROTL=Obróć w lewo SC_ROTR=Obróć w prawo SC_MORIG=Rzeczywisty wymiar SC_MFIT=Auto dopasowanie SC_MFITW=Dopasuj do szerokości SC_MFITH=Dopasuj do wysokości LANGUAGE=Język TRANSLATIONS=Tłumaczenia TRANSLATIONS_TIP=Jeżeli chcesz przetłumaczyć tę wtyczkę na inny język, wyślij e-mail na ten adres z informacją o języku którym się posługujesz. TRANSLATORS=Tłumacze VW_CENTER=Wyśrodkuj CUSTOM_CSS=Własne style (CSS) CUSTOM_CSS_TIP="body {\n background: #f3f3f5; /* Dowolna deklaracja tła zgodna z CSS (color, url(), gradient...). */\n overflow: hidden; /* Ukrywa paski przewijania. Aby je przywrócić, zmień \"hidden\" na \"auto\". */\n}\n\nimg {\n background: #eef; /* Inne tło dla obrazka. */\n border: 10px solid white; /* Obramowanie obrazka. */\n box-shadow: 0 0 10px grey; /* Cień obrazka. */\n cursor: default !important; /* Nie pozwala na zmianę wyglądu kursora. */\n}\n\n.mask {\n color: rgba(0, 0, 0, .4); /* Kolor maski w trybie powiększania wybranego obszaru. */\n}\n\n#menu {\n display: none; /* Wyłącza menu z dodatkowymi funkcjami. */\n}\n" VW_SC_HORIZONTALSCROLL=Aby przewijać obrazek w poziomie, użyj kółka myszy w lewym dolnym rogu strony CUSTOM_CSS_PH="Pozwala zmienić kolor tła, obramowanie i cień dla obrazka i ukryć paski przewijania, lub menu z dodatkowymi funkcjami.\nNajedź na znak zapytania by zobaczyć przykładowy kod. Użyj pipety kolorów powyżej, by znaleźć kod wybranego koloru." VW_SC_FLOATMENU=Najedź na lewy górny róg strony by zobaczyć menu OPENER=Otwieraj zwykłe obrazki na stronach OP_RIGHTLONG=przytrzymując prawy klawisz myszy OP_CTRLALTCLICK=Ctrl + Alt + prawy przycisk myszy OP_BOTH=obydwa VW_VIDEO=Włącz dla filmów VW_VIDATTRS=Ustawienia filmów VW_VIDATTRS_TIP="Dopuszczalne parametry:\nautoplay - film jest odtwarzany automatycznie\nloop - odtwórz ponownie po zakończeniu\ncontrols - pokazuj przyciski kontrolne odtwarzacza\nmuted - wycisz film\nvolume=0-100 - domyślna głośność (wyrażona w procentach)" SENDTO=Wyślij obrazek do... ; @language pt-BR, Portuguese (Brazil) (português (Brasil)) (70.18%) ; @translators Rômulo Godoi [lang] APP_DESCRIPTION=Additional functionality for the browser's default image and video viewer. NAV_GENERAL=General NAV_INFO=Dados SHORTCUTS=Atalhos do teclado PH_CLICKFORSAMPLE=clique para ver exemplos... DISABLED=desativado BUTTON_RESET=Padrão BUTTON_SAVE=Salvar VW_MODE=Tamanho de exibição VW_MODE_NATURL=tamanho original VW_MODE_AUTOFIT=redimensionar à tela VW_MODE_FITWIDTH=redimensionar à largura VW_MODE_FITHEIGHT=redimensionar à altura VW_MODE_BESTFIT=redimensionar da melhor forma VW_MINUPSCALE=Aumentar imagens pequenas VW_MINUPSCALE_TIP="Geralmente imagens pequenas não são exibidas em grande parte da tela. Esta função força que elas sejam.\nO valor é dado em porcentagem, e informa ao script para deixa-las de acordo com os dados de altura e largura fornecidos (isso depende das opções selecionadas)." VW_IMGINFO=Informações da imagem. VW_IMGINFO_TIP="Display custom information in the title of the tab. It may contain the following variables:\n%ow - original width\n%oh - original height\n%ratio - current width / current height\n%w - current width\n%h - current height\n%perc - percent of the original size\n%url - full URL\n%name - filename" VW_FAVICON=Ícone personalizado VW_FAVICON_TIP="Esta opção possibilita adicionar um ícone personalizado à imagem aberta.\nO endereço da imagem pode ser usado como variável: %url" VW_WHEELZOOM=Fazer zoom ao rodar roda do mouse VW_LPDELAY=Atraso de resposta (ms) VW_LPLEFT=Clique longo com o botão esquerdo do mouse VW_LPRIGHT=Clique longo com o botão direito do mouse VW_LPA_FITWH=caber na altura/largura VW_SC_CYCLE=Trocar entre os modos: tamanho original, caber na altura, caber na largura VW_SC_DRAGNDROP=Hold Ctrl or Alt to allow drag-and-drop, or drag from the right edge of the image, if that fits into the window VW_SC_RESET=Esc voltará a imagem à sua forma normal, ou sairá do zoom-livre VW_SC_FREEZOOM=Shift + arrastrar em cima da imagem para usar o modo de ampliação de seleção, mantenha pressionado Ctrl (sem soltar Shift) para mover a seleção SC_ZOOMINOUT=Zoom mais/menos SC_FLIPH=Virar à horizontal SC_FLIPV=Virar à vertical SC_ROTL=Rodar à esquerda SC_ROTR=Rodar à direita SC_MORIG=Tamanho original SC_MFIT=Dimensionar automaticamente SC_MFITW=Dimensionar à largura SC_MFITH=Dimensionar à altura LANGUAGE=Idioma TRANSLATIONS=Traduções TRANSLATIONS_TIP=Se você quiser se tornar um tradutor, envie um e-mail para este endereço, mencionando os idiomas que você fala. TRANSLATORS=Tradutores VW_CENTER=Center content CUSTOM_CSS=Estilo de CSS personalizado CUSTOM_CSS_TIP="body {\n background: #f3f3f5; /* Any valid background property (color, url(), gradient...). */\n overflow: hidden; /* Hides the scrollbars. To show them, change \"hidden\" to \"auto\". */\n}\n\nimg {\n background: #eef; /* Different background for the image. */\n border: 10px solid white; /* Image border. */\n box-shadow: 0 0 10px grey; /* Shadow of the image. */\n cursor: default !important; /* Don't allow the mouse curosr to change. */\n}\n\n.mask {\n color: rgba(0, 0, 0, .4); /* Color of the free-zoom mask. */\n}\n\n#menu {\n display: none; /* Disable the floating menu. */\n}\n" VW_SC_HORIZONTALSCROLL=To scroll the image horizontally, use the mouse wheel over the left bottom edge CUSTOM_CSS_PH="Change the background color, image border/shadow, and hide the scrollbars or the floating menu... \nHover the question mark to see examples, use the color picker above for getting color codes." VW_SC_FLOATMENU=Move the cursor to the top left edge of the page to show the menu OPENER=Open images from regular web-pages OP_RIGHTLONG=right long-press OP_CTRLALTCLICK=Ctrl + Alt + right click OP_BOTH=both VW_VIDEO=Enable for videos VW_VIDATTRS=Video attributes VW_VIDATTRS_TIP="Acceptable attributes\nautoplay - video starts automatically\nloop - repeat the play\ncontrols - show player controls\nmuted - mute sound\nvolume=0-100 - default volume (percent)" SENDTO=Enviar imagem para... ; @language ru, Russian (русский) (100%) ; @translators Rodny [lang] APP_DESCRIPTION=Дополнительная функциональность при просмотре изображений и видео в браузере. NAV_GENERAL=Настройки NAV_INFO=Инфо SHORTCUTS=Сочетания клавиш PH_CLICKFORSAMPLE=посмотреть примеры... DISABLED=отключено BUTTON_RESET=По умолчанию BUTTON_SAVE=Сохранить VW_MODE=Размер по умолчанию VW_MODE_NATURL=оригинальный размер VW_MODE_AUTOFIT=вписать VW_MODE_FITWIDTH=подогнать по ширине VW_MODE_FITHEIGHT=подогнать по высоте VW_MODE_BESTFIT=наилучшее заполнение VW_MINUPSCALE=Увеличивать маленькие изображения VW_MINUPSCALE_TIP="Как правило, небольшие изображения не увеличиваются до размеров области просмотра при масштабировании. Этот параметр заставит их это делать.\nЗначение задаётся в процентах, скрипт увеличит те изображения, размер которых больше данного процента от ширины или высоты области просмотра (в зависимости от предыдущей настройки)." VW_IMGINFO=Информация об изображении VW_IMGINFO_TIP="Отображение пользовательской информации в заголовке вкладки. Она может содержать следующие переменные:\n%ow - оригинальная ширина\n%oh - оригинальная высота\n%ratio - текущая ширина / текущая высота\n%w - текущая ширина\n%h - текущая высота\n%perc - процент от оригинального размера\n%url - полный URL\n%name - имя файла" VW_FAVICON=Пользовательская иконка VW_FAVICON_TIP="Этот параметр позволяет назначить произвольную иконку для вкладки с открытым изображением.\nАдрес изображения можно использовать как переменную: %url" VW_WHEELZOOM=Масштабировать колесом мыши VW_LPDELAY=Длительность нажатия (мс) VW_LPLEFT=Действие длительного нажатия левой кнопкой мыши VW_LPRIGHT=Действие длительного нажатия правой кнопкой мыши VW_LPA_FITWH=подогнать по ширине/высоте VW_SC_CYCLE=Переключить между режимами: оригинальный, подгон по ширине, подгон по высоте VW_SC_DRAGNDROP=Зажмите Ctrl или Alt, чтобы позволить drag-and-drop, или протяните от правого края изображения, если оно вписано в окно VW_SC_RESET=Esc возвращает изображение к первоначальному виду или выходит из режима свободного масштабирования. VW_SC_FREEZOOM=Зажать Shift + левую кнопку мыши на изображении для свободного масштабирования, дополнительно зажать Ctrl для перемещения выделения SC_ZOOMINOUT=Увеличить / уменьшить SC_FLIPH=Отразить по горизонтали SC_FLIPV=Отразить по вертикали SC_ROTL=Повернуть влево SC_ROTR=Повернуть вправо SC_MORIG=Оригинальный размер SC_MFIT=Вписать SC_MFITW=Подогнать по ширине SC_MFITH=Подогнать по высоте LANGUAGE=Язык TRANSLATIONS=Переводы TRANSLATIONS_TIP=Если вы хотите стать переводчиком, напишите по электронной почте на этот адрес, указав ваши языки. TRANSLATORS=Переводчики VW_CENTER=Центрировать содержимое CUSTOM_CSS=Пользовательский стиль (CSS) CUSTOM_CSS_TIP="body {\n background: #f3f3f5; /* Любое допустимое свойство фона (color, url(), gradient...). */\n overflow: hidden; /* Скрыть полосы прокрутки. Чтобы показать их, измените \"hidden\" на \"auto\". */\n}\n\nimg {\n background: #eef; /* Различный фон для изображения. */\n border: 10px solid white; /* Граница изображения. */\n box-shadow: 0 0 10px grey; /* Тень изображения. */\n cursor: default !important; /* Запретить изменение курсора. */\n}\n\n.mask {\n color: rgba(0, 0, 0, .4); /* Цвет маски свободного масштабирования. */\n}\n\n#menu {\n display: none; /* Отключить всплывающее меню. */\n}\n" VW_SC_HORIZONTALSCROLL=Для прокрутки изображения по горизонтали используйте колёсико мыши над левым нижним краем CUSTOM_CSS_PH="Можно изменять цвета фона, границу/тень изображения, скрывать полосы прокрутки или всплывающее меню... \nНаведите курсор на вопросительный знак, чтобы увидеть примеры, используйте палитру цветов выше для получения кодов цвета." VW_SC_FLOATMENU=Подведите курсор к верхнему левому краю страницы, чтобы показать меню OPENER=Открытие изображений c обычных веб-страниц OP_RIGHTLONG=длительное нажатие правой кнопки мыши OP_CTRLALTCLICK=Ctrl + Alt + правая кнопка мыши OP_BOTH=оба VW_VIDEO=Включить для видео VW_VIDATTRS=Атрибуты видео VW_VIDATTRS_TIP="Допустимые атрибуты\nautoplay - видео начинается автоматически \nloop - повторить воспроизведение\ncontrols - показывать элементы управления плейером\nmuted - отключение звука\nvolume=0-100 - уровень громкости по умолчанию (процент)" SENDTO=Отправить изображение в... ; @language uk, Ukrainian (українська) (70.18%) ; @translators Simofon [lang] APP_DESCRIPTION=Additional functionality for the browser's default image and video viewer. NAV_GENERAL=General NAV_INFO=Інфо SHORTCUTS=Поєднання клавіш PH_CLICKFORSAMPLE=Дивитить приклади... DISABLED=відключено BUTTON_RESET=Дефолні налаштування BUTTON_SAVE=Зберегти VW_MODE=Розмір за замовчуванням VW_MODE_NATURL=оригінальний розмір VW_MODE_AUTOFIT=вписати VW_MODE_FITWIDTH=підігнати по ширині VW_MODE_FITHEIGHT=підігнати по висоті VW_MODE_BESTFIT=найкраще заповнення VW_MINUPSCALE=Збільшувати маленькі зображення VW_MINUPSCALE_TIP="Як правило, невеликі зображення не збільшуються до розмірів області перегляду при масштабування. Цей параметр змусить їх це робити.\nЗначення задається у відсотках, скрипт збільшить ті зображення, розмір яких більше даного відсотка від ширини або висоти області перегляду (залежно від попередньої настройки)." VW_IMGINFO=Інформація про зображення VW_IMGINFO_TIP="Display custom information in the title of the tab. It may contain the following variables:\n%ow - original width\n%oh - original height\n%ratio - current width / current height\n%w - current width\n%h - current height\n%perc - percent of the original size\n%url - full URL\n%name - filename" VW_FAVICON=Іконка VW_FAVICON_TIP="Цей параметр дозволяє призначити довільну іконку для вкладки з відкритим зображенням.\nАдреса зображення можна використовувати як змінну: %url" VW_WHEELZOOM=Масштабувати колесом миші VW_LPDELAY=Тривалість натискання (мс) VW_LPLEFT=Дія тривалого натискання лівою кнопкою миші VW_LPRIGHT=Дія тривалого натискання правою кнопкою миші VW_LPA_FITWH=підігнати по ширині / висоті VW_SC_CYCLE=Переключити між режимами: оригінальний, підгін по ширині, підгін по висоті VW_SC_DRAGNDROP=Hold Ctrl or Alt to allow drag-and-drop, or drag from the right edge of the image, if that fits into the window VW_SC_RESET=Esc повертає зображення до первісного вигляду або виходить з режиму вільного масштабування. VW_SC_FREEZOOM=Зажати Shift + ліву кнопку миші на зображенні для вільного масштабування, додатково затиснути Ctrl для переміщення виділення SC_ZOOMINOUT=Збільшити / зменшити SC_FLIPH=Відобразити по горизонталі SC_FLIPV=Відобразити по вертикалі SC_ROTL=Повернути вліво SC_ROTR=Повернути вправо SC_MORIG=Оригінальний розмір SC_MFIT=Вписати SC_MFITW=Підігнати по ширині SC_MFITH=Підігнати по висоті LANGUAGE=Мова TRANSLATIONS=Переклади TRANSLATIONS_TIP=Якщо ви хочете стати перекладачем, напишіть електронною поштою на цю адресу, вказавши ваші мови. TRANSLATORS=Перекладачі VW_CENTER=Center content CUSTOM_CSS=Стиль (CSS) CUSTOM_CSS_TIP="body {\n background: #f3f3f5; /* Any valid background property (color, url(), gradient...). */\n overflow: hidden; /* Hides the scrollbars. To show them, change \"hidden\" to \"auto\". */\n}\n\nimg {\n background: #eef; /* Different background for the image. */\n border: 10px solid white; /* Image border. */\n box-shadow: 0 0 10px grey; /* Shadow of the image. */\n cursor: default !important; /* Don't allow the mouse curosr to change. */\n}\n\n.mask {\n color: rgba(0, 0, 0, .4); /* Color of the free-zoom mask. */\n}\n\n#menu {\n display: none; /* Disable the floating menu. */\n}\n" VW_SC_HORIZONTALSCROLL=To scroll the image horizontally, use the mouse wheel over the left bottom edge CUSTOM_CSS_PH="Change the background color, image border/shadow, and hide the scrollbars or the floating menu... \nHover the question mark to see examples, use the color picker above for getting color codes." VW_SC_FLOATMENU=Move the cursor to the top left edge of the page to show the menu OPENER=Open images from regular web-pages OP_RIGHTLONG=right long-press OP_CTRLALTCLICK=Ctrl + Alt + right click OP_BOTH=both VW_VIDEO=Enable for videos VW_VIDATTRS=Video attributes VW_VIDATTRS_TIP="Acceptable attributes\nautoplay - video starts automatically\nloop - repeat the play\ncontrols - show player controls\nmuted - mute sound\nvolume=0-100 - default volume (percent)" SENDTO=Надіслати зображення в... ; @language zh-CN, Chinese (Simplified Han) (中文(简体中文)) (70.18%) ; @translators fang5566 [lang] APP_DESCRIPTION=Additional functionality for the browser's default image and video viewer. NAV_GENERAL=General NAV_INFO=信息 SHORTCUTS=快捷键 PH_CLICKFORSAMPLE=点击查看样例... DISABLED=禁用 BUTTON_RESET=重置 BUTTON_SAVE=保存 VW_MODE=图片默认显示模式 VW_MODE_NATURL=原始尺寸 VW_MODE_AUTOFIT=嵌入查看器 VW_MODE_FITWIDTH=适应宽度 VW_MODE_FITHEIGHT=适应高度 VW_MODE_BESTFIT=最佳适应方式 VW_MINUPSCALE=放大小图片 VW_MINUPSCALE_TIP="通常小图片不会被放大到视图窗口(view-port)那么大,而该选项可以强制放大这些小图片。\n该选项值表示视图窗口宽度和高度值(这由前一个选项来决定)的百分比,用于告知脚本凡是大于该百分比的图片都强制放大。" VW_IMGINFO=图片信息 VW_IMGINFO_TIP="Display custom information in the title of the tab. It may contain the following variables:\n%ow - original width\n%oh - original height\n%ratio - current width / current height\n%w - current width\n%h - current height\n%perc - percent of the original size\n%url - full URL\n%name - filename" VW_FAVICON=自定义 favicon VW_FAVICON_TIP="该选项用于为打开的图片设置一个自定义的标签页图标。\n图片地址可使用以下变量:%url" VW_WHEELZOOM=使用鼠标滚轮缩放 VW_LPDELAY=鼠标点击时长(毫秒) VW_LPLEFT=鼠标左键长按时的操作 VW_LPRIGHT=鼠标右键长按时的操作 VW_LPA_FITWH=适应宽度/高度 VW_SC_CYCLE=在原始大小,适应宽度和适应高度三种显示模式中切换 VW_SC_DRAGNDROP=Hold Ctrl or Alt to allow drag-and-drop, or drag from the right edge of the image, if that fits into the window VW_SC_RESET=Esc 键可重置图片为原始显示方式,或退出自由缩放模式 VW_SC_FREEZOOM=Shift + 拖动 图片进入自由缩放模式,按住 Ctrl 时可移动选区 SC_ZOOMINOUT=缩小 / 放大 SC_FLIPH=水平翻转 SC_FLIPV=垂直翻转 SC_ROTL=向左旋转 SC_ROTR=向右旋转 SC_MORIG=原始尺寸 SC_MFIT=自动适应 SC_MFITW=适应宽度 SC_MFITH=适应高度 LANGUAGE=语言 TRANSLATIONS=翻译 TRANSLATIONS_TIP=如果您想参与翻译,请发送 e-mail 到这里并说明您要翻译的语言。 TRANSLATORS=译者 VW_CENTER=Center content CUSTOM_CSS=自定义样式 (CSS) CUSTOM_CSS_TIP="body {\n background: #f3f3f5; /* Any valid background property (color, url(), gradient...). */\n overflow: hidden; /* Hides the scrollbars. To show them, change \"hidden\" to \"auto\". */\n}\n\nimg {\n background: #eef; /* Different background for the image. */\n border: 10px solid white; /* Image border. */\n box-shadow: 0 0 10px grey; /* Shadow of the image. */\n cursor: default !important; /* Don't allow the mouse curosr to change. */\n}\n\n.mask {\n color: rgba(0, 0, 0, .4); /* Color of the free-zoom mask. */\n}\n\n#menu {\n display: none; /* Disable the floating menu. */\n}\n" VW_SC_HORIZONTALSCROLL=To scroll the image horizontally, use the mouse wheel over the left bottom edge CUSTOM_CSS_PH="Change the background color, image border/shadow, and hide the scrollbars or the floating menu... \nHover the question mark to see examples, use the color picker above for getting color codes." VW_SC_FLOATMENU=Move the cursor to the top left edge of the page to show the menu OPENER=Open images from regular web-pages OP_RIGHTLONG=right long-press OP_CTRLALTCLICK=Ctrl + Alt + right click OP_BOTH=both VW_VIDEO=Enable for videos VW_VIDATTRS=Video attributes VW_VIDATTRS_TIP="Acceptable attributes\nautoplay - video starts automatically\nloop - repeat the play\ncontrols - show player controls\nmuted - mute sound\nvolume=0-100 - default volume (percent)" SENDTO=发送图片到... {"_": "en", "cs": {"name": "Czech (čeština)", "translators": [{"email": "jaramat@email.cz", "fullname": "Jaroslav Matura", "name": "jaramat"}]}, "el": {"%": 66.67, "name": "Greek (Ελληνικά)", "translators": [{"email": "farow.the.time.traveler@gmail.com", "name": "Farow"}]}, "en": {"name": "English", "translators": [{"email": "deathamns@gmail.com", "name": "Deathamns"}]}, "es": {"name": "Spanish (español)", "translators": [{"email": "nightroad@mail.com", "fullname": "Javier Vera", "name": "DurianZheitk"}]}, "fi": {"%": 61.4, "name": "Finnish (suomi)", "translators": [{"email": "opeeera@myopera.com", "name": "Opeeera"}]}, "fr": {"%": 91.23, "name": "French (français)", "translators": [{"email": "tmnath2@gmail.com", "name": "Tmnath"}]}, "hu": {"name": "Hungarian (magyar)", "translators": [{"email": "deathamns@gmail.com", "name": "Deathamns"}]}, "ko": {"name": "Korean (한국어)", "translators": [{"email": "yut951121@gmail.com", "fullname": "유태종", "name": "QbsidianH20"}]}, "nl": {"%": 70.18, "name": "Dutch (Nederlands)", "translators": [{"email": "kackar@outlook.com", "name": "Kaçkar"}]}, "pl": {"name": "Polish (polski)", "translators": [{"fullname": "Paweł Pawlak", "name": "pafflick", "web": "http://www.pafflick.com/"}]}, "pt-BR": {"%": 70.18, "name": "Portuguese (Brazil) (português (Brasil))", "translators": [{"email": "romulo@brazilmail.com", "fullname": "Rômulo Godoi"}]}, "ru": {"name": "Russian (русский)", "translators": [{"email": "rodny0@gmail.com", "name": "Rodny"}]}, "uk": {"%": 70.18, "name": "Ukrainian (українська)", "translators": [{"email": "simofon@yandex.ru", "name": "Simofon"}]}, "zh-CN": {"%": 70.18, "name": "Chinese (Simplified Han) (中文(简体中文))", "translators": [{"email": "wlq105556@gmail.com", "name": "fang5566"}]}} :: Viewhance ::
0%

  • + / -