Chrome扩展程序弹出窗口.html很慢,打开不快?1.89KB 页面为 5 秒
Chrome Extension Popup.html very slow not opens fast? 5 seconds for 1.89kb page
美好的一天好人..
我需要问为什么会这样。
我为我的网站制作了一个简单的 chrome 扩展程序。 它具有以下代码,但是当我单击图标时大约需要3-5秒,为什么不立即打开?
基本上 Popup.html 包含一个 Iframe,它从谷歌驱动器加载一个网页,但它花费了太多时间,我想在线发布,但谁会喜欢这么慢的扩展?
iframe包含一个Google自定义搜索框和一个小表单
请参阅代码。帮助 e 为什么它很慢?
弹出窗口.html
<html>
<head>
</head>
<body>
<iframe width="400" height="400" name="iframe" seamless="seamless"src="https://googledrive.com/host/xxxxxxxxxxx/xxxxx.html"></iframe>
</body>
</html>
manifest.json
{
"name": "Instant Quotes!",
"description": "Search Quotes Instantly!",
"version": "0.1",
"manifest_version": 2,
"browser_action": {
"default_popup": "popup.html",
"default_icon": "icon.png",
"default_title": "Instant Quotes!",
"icons":
{
"48": "icon48.png",
"128": "icon_128.png"
},
"app": {
"launch": {
"web_url": "http://RationalQuotes.com/"
}}
}
}
内嵌框架页面
<!DOCTYPE html>
<html>
<head>
<style>
.cse input.gsc-input, input.gsc-input {background-image:'none') !
important;background-repeat:no-repeat;background-position:right; }::-webkit-scrollbar{ width: 10px; /* for
vertical scrollbars */ height: 50px; /* for horizontal scrollbars */}::-webkit-scrollbar-track{ rgba(0, 152, 199,
0.8);}::-webkit-scrollbar-thumb{ background: rgba(0, 162, 69, 0.9);}
</style>
<title></title>
</head>
<body>
<script>
(function()
{ var cx = '009043xxxxxxxxxxx88903:ntz9xxxxxxbzw'; var gcse = document.createElement('script'); gcse.type =
'text/javascript'; gcse.async = true; gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//www.google.com/cse/cse.js?cx=' + cx; document.body.appendChild(gcse); })
();
</script> <span style="font-size:10px;">OR</span>
<form>
<span style="font-size:10px;">Book: <input id="value1" type="text"> (1
to 200)<br>
Page : <input id="value2" type="text"> (Depends)<br>
<input onclick="redirect()" style="width:95px" type="button" value=
"Meaning!"> <input onclick="Quotes()" style="width:96px" type="button"
value="Quote!"></span>
</form><span style="font-size:10px;"><script>
function tafsir() { window.location.assign
("http://www.example.com/xyz/abc/" + document.getElementById("value1").value + "/index.html");}
</script><script>
function redirect() { window.location.assign("http://example.com/xyz/" +
document.getElementById("value1").value + "/" + document.getElementById("value2").value +
"/printview.html");}
</script></span><span style="font-size:10px; color:#008000;">(Note: Page
No. is Compustory for Qoutes)</span><span style="font- size:8px;"><a href=
"http://example.blogspot.com" target=
"_blank">RationalQoutes.com</a></span><br>
</body>
</html>
修改清单.json
"background": {
"page": "popup.html"
},
相关文章:
- 如何使用url加载程序在webpack中导入多个图像
- keyup事件处理程序更改焦点不适用于快速键入
- 用程序搜索JQuery数据表中的文本
- Javascript:selenium Web驱动程序isDisplayed()不工作
- Canvas Html5绘图应用程序,移动画布会导致重大问题
- Emberjs应用程序加载在除Index之外的所有路由上
- ExtJS 5用程序点击actioncolumn gridview
- 使用电话间隙在Android应用程序中显示SQL Lite的数据
- 如何从Java/scala调用js美化程序
- 在AngularJS应用程序中使用封装指令和路由的推荐方式是什么
- Windows8应用程序(html&Javascript):从图片库(除了文件选择器)显示图像的另一种方式
- angular 1.5应用程序中的导航栏
- YUI3 IO实用程序是否可以根据给定的内容类型标头值自动序列化数据
- 如何创建带有插槽的vue js组件预加载程序
- Webpack/Rect:遵循egghead.io教程,但出现错误:您可能需要一个合适的加载程序来处理此文件类型
- 在Windows 10中自动执行例行程序(主要与浏览器交互)
- 在Web应用程序中使用Highcharts javascript
- 递归使用 eval() 是检查程序执行的好方法吗?
- angularjs+rails应用程序中未显示模板
- Chrome扩展程序弹出窗口.html很慢,打开不快?1.89KB 页面为 5 秒