browser

Executing Vbscript from IE Address Bar

五迷三道 提交于 2021-02-11 12:53:28
问题 Is there a way I can execute my vbscript code directly from my address bar? I am looking for something similar to what we have for JavaScript. On a side note, isn't running vbscript from browser a major security risk, as it has more privileges while running than JavaScript? 回答1: Pretty much the same way as Javascript it just doesn't work very well: vbscript:replace(document.body.innerhtml,"Address Bar","sandwich") Essentially this navigates to a page that has source equivalent to the returned

Chrome is not letting HTTP hosted site to access Camera & Microphone

混江龙づ霸主 提交于 2021-02-10 11:57:23
问题 I'm using react-webcam to capture a selfie for an application. On localhost, react-webcam works perfectly whereas on HTTP hosted web server camera access is being denied by default on the Chrome. Is there any workaround for webcam access or any other npm plugin which can serve the purpose here. NOTE: HTTPS supported sites are allowed to access both the Camera & Microphone. Here, I'm left with only HTTP choice. 回答1: The react-webcam uses the getUserMedia API which specification states: When on

Chrome is not letting HTTP hosted site to access Camera & Microphone

送分小仙女□ 提交于 2021-02-10 11:56:50
问题 I'm using react-webcam to capture a selfie for an application. On localhost, react-webcam works perfectly whereas on HTTP hosted web server camera access is being denied by default on the Chrome. Is there any workaround for webcam access or any other npm plugin which can serve the purpose here. NOTE: HTTPS supported sites are allowed to access both the Camera & Microphone. Here, I'm left with only HTTP choice. 回答1: The react-webcam uses the getUserMedia API which specification states: When on

Spec for handling of HTML entities in a[href]

北慕城南 提交于 2021-02-10 08:38:49
问题 I'm looking for a spec on handling HTML entities in the href attribute of <a> tags. So far, no luck (I might be searching for something too specific). In detail: The bug I'm trying to fix is part of the cheerio project. Some entities don't require a semicolon at the end. One of them is &curren . Anyway, this leads to problems when a source links to /test/example.jsp?item=123&currentSize=S&currentQty=1 . Browsers (at least Chrome) handle this nicely. I still haven't figured out why though. 回答1

Change navigator.platform on Chrome, Firefox, or IE to test OS detection code

陌路散爱 提交于 2021-02-09 06:54:51
问题 How can I spoof the value of navigator.platform on Chrome, Firefox, or Internet Explorer (preferably Chrome)? It looks like it used to be possible on Firefox natively but that support was dropped for that. This is to test some code on a site which runs in a conditional JavaScript check which tests the navigator.platform property. Unfortunately it's not testing userAgent which would be easy to change. I tried writing a simple chrome extension per the suggestion in the second post on https:/

Outlook Web Add-In: Change the embedded browser and open browser of your choice

爷,独闯天下 提交于 2021-02-08 12:12:32
问题 I am just developing an Outlook Web Add-In. I suppose that Microsoft uses Internet Explorer 11 which is embedded in the Outlook 2016 desktop client. Is there a possibility to change this to another browser, for example Chrome. I also open a new browser in JavaScript (window.open) which is again Internet Explorer 11. In this case I want to change the browser too, e.g. Chrome. 回答1: Answer to first question - You cannot change the browser in which the addin is loaded inside Outlook Desktop.

Disable cache for certain resource programmatically

痴心易碎 提交于 2021-02-08 10:14:58
问题 I have this setting in Chrome devtools: this setting works for me. However, I also want to disable the cache for certain resources. My question is - is there a way to disable the cache for a resource when you use fetch? fetch(url).then(v => {}); is there some option or header that we can use to prevent the browser from using the cache to retrieve the resource? 回答1: This has the answers I was looking for: https://hacks.mozilla.org/2016/03/referrer-and-cache-control-apis-for-fetch/ first make

Browser fingerprinting and Firefox

霸气de小男生 提交于 2021-02-08 10:14:56
问题 I'm wondering if there is a way to fake your browser fingerprint (can be tested on sites like https://panopticlick.eff.org/) by making the browser (firefox in my case) supply fake data? If so i would like to make an extension that does it. Is that possible? If it is any suggestions as to how would i go about doing it? Many Thanks! 回答1: Just make an extension that is a proxy and every http request that goes out would go through your extension's proxy. Then take the data and manipulate it

Differentiate browser refresh and browser close

一笑奈何 提交于 2021-02-08 09:09:27
问题 I want to set a cookie when a visitor on the page closes the browser. I used onbeforeunload method like this <script language="JavaScript" type="text/javascript"> window.onbeforeunload = confirmExit; function confirmExit() { return "You have attempted to leave this page. If you have made any changes to the fields without clicking the Save button, your changes will be lost. Are you sure you want to exit this page?"; } </script> followed this link But found out that even refresh of page or

Differentiate browser refresh and browser close

让人想犯罪 __ 提交于 2021-02-08 09:09:25
问题 I want to set a cookie when a visitor on the page closes the browser. I used onbeforeunload method like this <script language="JavaScript" type="text/javascript"> window.onbeforeunload = confirmExit; function confirmExit() { return "You have attempted to leave this page. If you have made any changes to the fields without clicking the Save button, your changes will be lost. Are you sure you want to exit this page?"; } </script> followed this link But found out that even refresh of page or