The chrome extension I am developing inserts content scripts and css onto every page of a website. However, the user may have a certain page or pages he or she does not want the extension to run on, so it would be great if I could set up the browser action as basically a toggle on / off. What I’d
Tag: google-chrome
JavaScript: use defineProperty accessor on an array’s .length?
I would like (mainly for academic reasons) to be able to set an accessor on an array’s length using Object.defineProperty(), so than I can notify for size changes. I am aware of ES6 object observe, and watch.js, but I would like to attempt to do this in ES5 without extra libraries if possible, even if this is only for V8/Chrome.
How to Disable V8’s Optimizing Compiler
I’m writing a constant-time string comparison function (for node.js) and would like to disable V8’s optimizing compiler for this single function; using command-line flags are out of the question. I know that using a with{} (or try/catch) block will disable the optimizing compiler now, but I’m afraid this “feature” (bug) will be fixed in future versions. Is there an immutable
Video auto play is not working in Safari and Chrome desktop browser
I spent quite a lot of time trying to figure out why video embedded like here: starts playing automatically once the page is loaded in FireFox but cannot do autoplay in Webkit based browsers. This only happened on some random pages. So far I was unable to find the cause. I suspect some unclosed tags or extensive JS created by
How can I stop Chrome from going into debug mode?
If the debugging window is open, the debugger starts hitting lines by itself even though there are no set breakpoints. I have tried using the “Deactivate breakpoints” button and it doesn’t make a difference if it is on or off. This happens on any website. Answer You’ve accidentally set “Pause on Exceptions” to all/uncaught exceptions. Go to the “Sources” tab.
onunload does in Chrome
I am opening a new window as below to var nResult = window.showModalDialog(“getSelection.asp?Type=” + inputType, “”, “dialogHeight:220px; dialogWidth:400px; resizable=no; help:no; status:no”); Now on getSelection.asp I have following syntax for body <BODY onload=”RetrieveDialogArguments();document.thisForm.ok.focus();” onunload=”ReturnDialogArguments()” > when I put alert then found that onload event works and call to RetrieveDialogArguments() but onunload event does not work and function ReturnDialogArguments() does not call.
Is there a way to filter network requests using Google Chrome developer tools?
Is it possible to filter out some requests using Chrome developer tools, say, filter out all image requests? Answer There isn’t a very flexible filtering feature, but the bar at the bottom does allow you to only show requests of a certain document or connection type: You can’t just exclude images, but it should help. You can also press Control/Command+F
Simple bookmarklet not working in chrome
I am new to bookmarklet coding and i have run into a problem where the regular javascript works fine in the browser but not the bookmarklet version. I had found a bookmarklet which finds a image and turns it into BB code and that works fine, however it loads jQuery and i did not want it doing that all the
Drop Event Not Preventing Default
I’ve the following: http://jsfiddle.net/KywJT/ I’m using Chrome version 24.0.1312.52 m and last jQuery (1.8.3). When I drop a file into the box, browser is not preventing default beaviour. Can you please help me? P.S. dragexit is deprecated correct? Answer This should fix the issue for you.
How to disable JavaScript in Chrome Developer Tools?
I am trying to debug the features of a website when users disable their JavaScript. I was wondering how do you disable JavaScript for a page from the Google Chrome DevTools? Answer Click the gear icon in the corner of the Developer Tools, click Settings, then under Debugger, check Disable Javascript, as shown in the following video: