iframe

Chrome-extension URL match patterns:Why rules are not working for Google.com?

荒凉一梦 提交于 2020-01-14 03:05:21
问题 I'm making an extension to customize Google' homepage background.So I write some match rules in manifest like this: "content_scripts": [ { "matches": ["https://www.google.com/", "http://www.google.com/"], "js": ["static/js/jquery.js", "static/js/contentscript.js"] } ], and some scripts in contentscript.js : var imgURL = chrome.extension.getURL("static/images/bg.jpg"); $('body').css('background-image', 'url(' + imgURL + ')'); The script works fine for https://www.google.com, but when I try to

How to save image of iframe underneath HTML5 canvas?

我只是一个虾纸丫 提交于 2020-01-14 02:41:14
问题 I am trying to call a webpage on my canvas on which I can draw or add notes. Now I want to take a screenshot where the drawing is saved with the webpage as background. I called a url in iframe behind the canvas (using z-index) I can save only the image which I draw on canvas and not the webpage which I called. Please help how I can get it to work. Is there any way I can call a url within my canvas? 回答1: This was already answered in this post: Capture HTML Canvas as gif/jpg/png/pdf? - You can

《工作小结》_20200105

不打扰是莪最后的温柔 提交于 2020-01-14 00:53:15
1、Android 与 IOS 端 差异: getTime() 方法差异:解决ios日期时间戳无法显示是因为输入的日期格式的问题,ios无法识别2019-06-27 14:30:07以‘-’区分的日期格式,要以’/'为准,所以写法不一样大致结果NAN。 sta_Date = new Date((data.records[0].Batch_Display_List[i].Start_Time).replace(/-/g,'/')).getTime(); end_Date = new Date((data.records[0].Batch_Display_List[i].End_Time).replace(/-/g,'/')).getTime(); Android 无法识别 8位 颜色。 2、去掉弹窗里的域名:alert confirm // 去掉 alert 弹窗的域名 window.alert = function(name){ var iframe = document.createElement("IFRAME"); iframe.style.display="none"; iframe.setAttribute("src", 'data:text/plain,'); document.documentElement.appendChild(iframe); window

Remove image upload button in Microsoft BotFramework iFrame

岁酱吖の 提交于 2020-01-13 19:29:29
问题 Does the iframe embed has any configuration / support to disable the button ? 回答1: The embed web chat doesn't have direct configuration to disable the upload botton and functions. However, the embed web chat is built by the project BotFramework-WebChat, so you can modify the source code, and compile into your own version to achieve your requirement. Clone the repo https://github.com/Microsoft/BotFramework-WebChat to your local work space, run npm install to install all the node.js

setting useragent of iframe via javascript

不打扰是莪最后的温柔 提交于 2020-01-13 16:32:46
问题 Business requirement trying to be met: Loading an existing page within an iframe, emulating an iphones user agent. The reason this needs to happen client side, is that there are client side scripts which detect the user agent and appends some classes onto the html element. Based on this the style of the site will radically change as the CSS targets elements based on the html classes. So it would take and turn it into or in the case that I'm trying to resolve here etc. Using window.open works

setting useragent of iframe via javascript

↘锁芯ラ 提交于 2020-01-13 16:31:50
问题 Business requirement trying to be met: Loading an existing page within an iframe, emulating an iphones user agent. The reason this needs to happen client side, is that there are client side scripts which detect the user agent and appends some classes onto the html element. Based on this the style of the site will radically change as the CSS targets elements based on the html classes. So it would take and turn it into or in the case that I'm trying to resolve here etc. Using window.open works

setting useragent of iframe via javascript

落花浮王杯 提交于 2020-01-13 16:31:29
问题 Business requirement trying to be met: Loading an existing page within an iframe, emulating an iphones user agent. The reason this needs to happen client side, is that there are client side scripts which detect the user agent and appends some classes onto the html element. Based on this the style of the site will radically change as the CSS targets elements based on the html classes. So it would take and turn it into or in the case that I'm trying to resolve here etc. Using window.open works

CSS: Inset shadow by parenting div over iframe

风格不统一 提交于 2020-01-13 16:21:11
问题 I'd like to achieve an effect of a shadowed iframe element by its parenting div element. HTML <div> <iframe width="560" height="315" src="//www.youtube.com/embed/zdOmNiXvM3w?rel=0" frameborder="0" allowfullscreen></iframe> </div> CSS div { box-shadow: inset 0px 11px 8px -10px black, inset 0px -11px 8px -10px black; } The above is what I've got so far, but the iframe appears to take priority regardless of using z-index in CSS. I've used a Youtube iframe in this example, but this solution also

CSS: Inset shadow by parenting div over iframe

橙三吉。 提交于 2020-01-13 16:21:06
问题 I'd like to achieve an effect of a shadowed iframe element by its parenting div element. HTML <div> <iframe width="560" height="315" src="//www.youtube.com/embed/zdOmNiXvM3w?rel=0" frameborder="0" allowfullscreen></iframe> </div> CSS div { box-shadow: inset 0px 11px 8px -10px black, inset 0px -11px 8px -10px black; } The above is what I've got so far, but the iframe appears to take priority regardless of using z-index in CSS. I've used a Youtube iframe in this example, but this solution also

Embed PDF in mobile browsers

泪湿孤枕 提交于 2020-01-13 13:57:48
问题 I have the code below which is a perfect solution to what I need, which would essentially be embedding any of JPG, GIF, PNG or PDF files in my webpages. It works perfectly in PC browsers, but a critical requirement for the pages is to have them compatible in mobile browsers due to its target users. <iframe src="uploads/test1.pdf" width="auto" height="auto"> </iframe> Although image files work fine, PDF files are opened separately in the mobile browser and not embedded inline in the web page.