Posts

Showing posts with the label Browser

Browser Says "Camera Blocked To Protect Your Privacy"

Answer : type url chrome://flags/#unsafely-treat-insecure-origin-as-secure Enter url in the textarea Choose Enabled in the select option Click image link bellow to see detail example Chrome blocks vulnerable features—including camera, location, microphone, etc. on non-secure sites. As of July 2018, with the release of Chrome 68, Chrome starts to mark all HTTP sites as "not secure." You have three options to unblock these features for your site: Treat 192.168.10.79 as secure origins by setting chrome://flags/#unsafely-treat-insecure-origin-as-secure . Origins must have their protocol specified, e.g., http://192.168.10.79 . Port forwarding your site address to localhost . Chrome treats localhost as secure origins. Set up a self-signed certificate for the server.

Block Specific URL On Web Browsers

Answer : The answer will only SLIGHTLY differ by the operating system you are using. I'm running Ubuntu on a powerpc :p but in general the same rules apply on windows and mac as well. If these instructions do not work for you then I will adapt this answer for your OS. For now here is the Linux method. The only way I have found after hours of searching, to do this, is to install privoxy . Once you install privoxy you need to edit the /etc/privoxy/config file in the following manner: 1) Find where it says #listen-address localhost:8118 and uncomment this line so that it says listen-address localhost:8118 2) Add the following lines to the bottom of this config file: actionsfile blacklist.action actionsfile whitelist.action 3) Now you need to create these action files in a text editor as root: a) gksu gedit /etc/privoxy/blacklist.action and add the following { +block } www.apple.com/itunes twil.tv/category/video www.url.com/page anything you add under...

Caching A Jquery Ajax Response In Javascript/browser

Answer : cache:true only works with GET and HEAD request. You could roll your own solution as you said with something along these lines : var localCache = { data: {}, remove: function (url) { delete localCache.data[url]; }, exist: function (url) { return localCache.data.hasOwnProperty(url) && localCache.data[url] !== null; }, get: function (url) { console.log('Getting in cache for url' + url); return localCache.data[url]; }, set: function (url, cachedData, callback) { localCache.remove(url); localCache.data[url] = cachedData; if ($.isFunction(callback)) callback(cachedData); } }; $(function () { var url = '/echo/jsonp/'; $('#ajaxButton').click(function (e) { $.ajax({ url: url, data: { test: 'value' }, cache: true, beforeSend: function () { i...

Chrome Extension: Execute Background Page Only Once When Chrome Starts

Answer : What you are using is an Event Page(background_page.js). Event pages are unloaded when the browser detects that the page is not doing anything. So what's happening is that when you open a new tab, the Event page is being reloaded and starts executing from the top again. This way chrome is able to have your app use less memory and speed up the browser. If you want to fix the problem simply use persistent:true which will make sure the page "persists" indefinitely or until the user closes the browser. If you would really like to keep your app efficient with memory, you should take a look at the runtime.onSuspend method which gets called each time your Event page unloads. This way you can save stuff before the page gets unloaded so that you can resume where you left off. UPDATE: According to current documentation you simply have to delete the persistent key (no need to change it to "persistent": true ). This is an event page : { "name...

Alternatives To JavaScript

Answer : The problem with javascript is not the language itself - it's a perfectly good prototyped and dynamic language. If you come from an OO background there's a bit of a learning curve, but it's not the language's fault. Most people assume that Javascript is like Java because it has similar syntax and a similar name, but actually it's a lot more like lisp. It's actually pretty well suited to DOM manipulation. The real problem is that it's compiled by the browser, and that means it works in a very different way depending on the client. Not only is the actual DOM different depending on the browser, but there's a massive difference in performance and layout. Edit following clarification in question Suppose multiple interpreted languages were supported - you still have the same problems. The various browsers would still be buggy and have different DOMs. In addition you would have to have an interpreter built into the browser or somehow i...

Chrome Extension Id - How To Find It

Answer : Use the chrome.runtime.id property from the chrome.runtime API. You get an extension ID when you upload your extension to Google Web Store. Ie. Adblock has URL https://chrome.google.com/webstore/detail/cfhdojbkjhnklbpkdaibdccddilifddb and the last part of this URL is its extension ID cfhdojbkjhnklbpkdaibdccddilifddb . If you wish to read installed extension IDs from your extension, check out the managment module. chrome.management.getAll allows to fetch information about all installed extensions. If you just need to do it one-off, navigate to chrome://extensions . Enable Developer Mode at upper right. The ID will be shown in the box for each extension. Or, if you're working on developing a userscript or extension, purposefully throw an error. Look in the javascript console, and the ID will be there, on the right side of the console, in the line describing the error. Lastly, you can look in your chrome extensions directory; it stores extensions in director...