fennec

嵌入Base64图像

房东的猫 提交于 2020-01-09 20:29:38
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 纯粹出于好奇,哪些浏览器可以进行Base64图像嵌入工作? 我指的是 这个 。 我意识到它对于大多数事情来说通常不是一个好的解决方案,因为它会增加页面大小 - 我只是好奇。 一些例子: HTML: <img alt="Embedded Image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..." /> CSS: div.image { width:100px; height:100px; background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA...); } #1楼 更新:2017-01-10 现在所有主流浏览器都支持数据URI。 IE也支持从版本8开始嵌入图像。 http://caniuse.com/#feat=datauri 以下Web浏览器现在支持数据URI: 基于Gecko的,如Firefox,SeaMonkey,XeroBank,Camino,Fennec和K-Meleon Konqueror,通过KDE的KIO奴隶输入/输出系统 Opera(包括任天堂DSi或Wii等设备) 基于WebKit,如Safari(包括在iOS上)

How to use jQuery in content script in a Firefox Mobile (Fennec) extension?

[亡魂溺海] 提交于 2020-01-04 04:04:11
问题 I am developing a Firefox Mobile (Fennec) extension and I want to use jQuery in the content script. What is the best way to do it? I am doing the testing on the desktop version of Firefox Mobile 4 回答1: overlay.js window.addEventListener("load", function (aEvent){ document.getElementById("browsers").addEventListener("DOMContentLoaded", function onWindowLoad(aEvent){ window.messageManager.loadFrameScript("chrome://myExtension/content/jquery.js", true); window.messageManager.loadFrameScript(

How to listen to page loads from Fennec extension?

血红的双手。 提交于 2020-01-03 17:51:09
问题 I'm working on a simple extension for Fennec, which must add special HTML element to every loaded page. I've created this simple overlay.js: var MyAddon = { onLoad: function(aEvent){ var appcontent = document.getElementById("appcontent"); // Firefox if (!appcontent) { appcontent = document.getElementById("browsers"); // Fennec } if (appcontent) { appcontent.addEventListener("DOMContentLoaded", MyAddon.onDocumentLoad, true); } }, onUnLoad: function(aEvent){ var appcontent = document

Hiding the address bar in mobile Firefox

耗尽温柔 提交于 2020-01-01 05:21:09
问题 I have tried the various scrollTo() solutions which hide the address bar in a mobile browser, but none of them seem to work at all in mobile Firefox. Is there a different trick which needs to be used in that situation? 回答1: If you're in charge of writing the pages that you want fullscreen, you can run these littl bits of code to use the API: function setFullScreen(el) { if (el.requestFullscreen) { el.requestFullscreen(); } else if (el.msRequestFullscreen) { el.msRequestFullscreen(); }else if

How to install packaged app on Firefox for mobile?

烈酒焚心 提交于 2019-12-10 12:23:05
问题 How do I test-install a packaged (zip) app on Fennec? Device: Physical Android phone or Android emulator, I don't care. 回答1: Install mozilla-apk-cli using NPM: npm install -g mozilla-apk-cli Use it to generate a "debuggable" APK for your app from either a source directory or a URL to the mini-manifest: mozilla-apk-cli /path/to/source/dir/ arbitrary-name.apk mozilla-apk-cli http://example.com/path/to/mini/manifest.webapp arbitrary-name.apk (Context-click > Inspect Element on the "Free" button

Hiding the address bar in mobile Firefox

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 14:12:35
I have tried the various scrollTo() solutions which hide the address bar in a mobile browser, but none of them seem to work at all in mobile Firefox. Is there a different trick which needs to be used in that situation? If you're in charge of writing the pages that you want fullscreen, you can run these littl bits of code to use the API: function setFullScreen(el) { if (el.requestFullscreen) { el.requestFullscreen(); } else if (el.msRequestFullscreen) { el.msRequestFullscreen(); }else if (el.mozRequestFullScreen) { el.mozRequestFullScreen(); }else if (el.webkitRequestFullscreen) { el