google-chrome-extension,firebase,content-security-policyRelated issues-Collection of common programming errors


  • Kim
    jquery google-chrome-extension
    I am building my first extension and have problems getting background page loaded scripts working in content scripts, which brings doubts to if any script loaded on the background page is really available to all content scripts.I have two javascript files, functions.js and content.js, which both use jQuery. I load jQuery and the function script on the background page to decrease parsing with each site match. Once is enough as they are all functions.manifest.json NON-WORKING{“name”: “extension na

  • Scoregraphic
    .net google-chrome-extension ipc
    I have a question regarding browser remote controlling. My primary goal is to read out all open tab URLs from Google Chrome and also focus a tab if a matching URL is found and reload the current page. All this stuff is invoked from the native application (not from Chrome to the native application.Currently, I’ve tried to do with Win32-API stuff (FindWindowEx, …), new .NET Automation stuff, but this just gives me nothing (the former) or only the URL of the current tab (the latter).So I thought

  • Sean Anderson
    javascript iframe google-chrome-extension cross-domain
    I am developing inside of a Google Chrome Extension. In this environment, I have the ability to inject JavaScript into third-party websites after requesting the appropriate permissions. As such, I am injecting code into an iframe referencing a cross-domain resource, but am not bound by the same cross-origin security policies as would be expected in a ‘normal’ environment.The code I am executing inside of this iframe is:var requestId = window.requestAnimationFrame(function(){console.log(“Success”

  • Giuseppe Pes
    javascript google-chrome google-chrome-extension google-chrome-app google-nativeclient
    I am writing a small application to test and understand PNaCl.The aim of the application is to resolve an host name a the ip of an host using HostResolver class from PNaCl framework. The code seems to work properly but I am getting an access denied error (return value -7) because I haven’t asked the permission to access the socket layer (I guess) to the user. The problem is that I have no idea how to do so. I trie to write a manifest file, but nothing happened. Note : this application must run o

  • UserABC
    c++ google-chrome-extension google-nativeclient
    I am trying to create an Extension for Google Chrome ,in which I want to process some images. The extension was previously created using NPAPI ,but that being phased out need to switch to another alternative, Native Messaging looked like the best suited for this job. The native host is written in C++ and it reads from stdin a formated message sent from extension(some like {action:”name_of_action”,buffer:”x0x0″,length:”4″} ),parse it ,extract the buffer and do some processing with the image,after

  • Brock Adams
    google-chrome google-chrome-extension greasemonkey
    My goal is to use a Greasemonkey-style user script in Google Chrome to enable remembering of passwords on a specific form that has the autocomplete=”off” attribute set.Chrome’s developer tools indicate that autocomplete=”on” is being successfully set by the script, but this does not have the expected effect of allowing the storage of passwords on the form.Why doesn’t this work?ExampleChrome offers to remember passwords entered on this test page (Expected):<html><body><form action=

  • Zeynel
    javascript scope google-chrome-extension
    This question is about a similar javascript scope problem that I asked yesterday. I hope you can help me resolve this issue.I am working with a Chrome extension. options.html saves to localStorage a new user email as “user” and calls refreshUser() function in background.html://save entered gmail address document.getElementById(“save”).addEventListener(“click”, function (){var user = document.getElementById(“getEmail”).value;localStorage.setItem(“user”, user);chrome.extension.getBackgroundPage().

  • Methos
    google-chrome google-chrome-extension
    I’ve written a chrome extension in which the content script, immediately after getting loaded, talks to the background page and informs which website was loaded in that tab. But I see a very strange pattern when I search for queries in google. Let’s say, if I search for “javascript regular expressions” and first result is “w3schools.com”, then my background page reports that content script sent “google.com” and then “w3schools.com”. Out of this, the first reporting is expected since I am searchi

  • Mathletics
    javascript google-chrome-extension
    In this instance, I load a single paypal page, in which I am prompted to login. Once I login, the page changes, through the use of other javascripts on paypal’s end. The address does not change on this transition, nor does the source code in any material way. I am trying to find a way to have my script wait long enough after the first click to be able to get the element that loads after. I thought I could do this fairly simple using the following:document.getElementById(“submitLogin”).click(

  • Braiam
    javascript google-chrome google-chrome-extension
    I’m having a piece of code very simple. It checks two parameters. If first parameter is false it change the popup icon in the chrome extension, if it’s true and previously was false, then it change the icon backs and if no parameters is passed it returns the current values.The problem is that either way, both the variable and the first parameter that is being passed as boolean, is interpreted as string and that produce unexpected results. Here’s my code:var status = true; var reason; function is

  • Tom Maton
    angularjs firebase angularfire
    I’m trying to add data to existing data within Firebase using AngularFire my data currently looks like this, very simple list of clients:clients–Firebase UID—-client: Client1–Firebase UID—-client: Client2–Firebase UID—-client: Client3But I want to be able to add under the client sections such as team with a list of team members and some of their details. eg–Firebase UID—-client: Client1——team: {Bob: {email: address, position: developer}, Peter: {email: address, position: develope

  • Great Question
    java android listview firebase
    My goal is just to retrieve data from Firebase and then output it as ListView in Android (No need to push anything back to the database). I tried to learn from the AndroidChat example and created my own class and my own Custom List Adapter class instead of Chat.java and ChatListAdapter.java (as in the orignal example). I also changed the references to my Firebase and resemble my data structure to that of https://android-chat.firebaseio-demo.com/. Below is my data structure: (Everything below is

  • Great Question
    java android firebase
    This question is also trying to find out the answer for this question that I posted several days ago.The weird thing about the AndroidChat app is when I changed the Chat class properties name to different name. It result in a “Failed to bounce to type” exception. Same thing happened when I changed the name (from author to author2) in my firebase instance. Below are screenshots describing what I’m trying to say. Also there is a LogCat at the end:When changing from author to author2 in Chat.java:O

  • Marco W.
    java firebase
    I’m using Firebase in Java. The following simple code has always worked fine when users’ information had to be updated:final FirebaseBean_User userObject = new FirebaseBean_User(uuid, name, timestamp, points, gamesPlayed, gamesWon); mFirebaseUser.setValue(userObject, System.currentTimeMillis());I used the current timestamp as the priority value so that I can get a list of all users that have been online recently.However, when users go offline, I would like to mark them as offline. Thus, I added

  • cilphex
    firebase
    Or will it cause an error?Example:authClient = new FirebaseAuthClient(baseRef, function(error, user) { … });// Try to log in… authClient.login(‘password’, {email: ‘some_email’, password: ‘some_password’});// Before the callback from the previous line of code executes… // Oh wait, I forgot to signup in the first place, let me do that: authClient.createUser(‘some_email’, ‘some_password’, function(error, user) { … });

  • Baz
    node.js firebase
    I am running a transaction to update an item that needs to be stored in two keys. To accomplish this, I have setup a nested transaction as follows, and it seems to run as expected:firebaseOOO.child(‘relationships/main’).child(accountID).child(friendAccountID).transaction(function(data) {data.prop = ‘newval’;firebaseOOO.child(‘relationships/main’).child(friendAccountID).child(accountID).transaction(function(data) {return r;});return r; });Are there any gotchas or possible unexpected implications

  • MassStrike
    java android dynamic android-view firebase
    I have and Android app which adds TableViews, TableRows and TextViews dynamically at run time according to data found in a Firebase repository. More specifically, a TableView is added for each “Poll” found in the repo to the static LinearLayout, for each “Election” found in the Poll a TableRow is added to that Tablelayout, and for each “Nominee” in the Election a TableRow containing two TextViews for data is added to the TableLayout as well. So potentially I could have multiple tables added at r

  • MasterScrat
    android firebase
    What is the minimum Android SDK version to use Firebase on Android?I see that the AndroidDrawing example works with API Level 17, but not 11. What exactly is the limit?To be more precise: it doesn’t crash, but the application never receives any data. So for the AndroidDrawing example I am basically drawing on my own.edit: Platform version 4.0 (API Level 14) doesn’t work either.

  • connor
    ios objective-c exc-bad-access firebase
    I’m getting a EXC_BAD_ACCESS whenever I try to call a method on one of my Firebase objects. Here is the line it is currently crashing on:NSLog(@”%@”,[self.ref description]);I’ve made sure self.ref is not nil. Any help is appreciated. Thanks!Edit: here is its property declaration: @property (strong, nonatomic)Firebase* ref;

  • James Dinsdale
    javascript variables global-variables firebase
    I’m trying to set up user authentication with Firebase and Twitter. The code from this answer works to a point:var url = ‘https://molovo-comments.firebaseio.com/’; var myDataRef = new Firebase(url);var dataStore = (function(){var user = null;var auth = new FirebaseSimpleLogin(myDataRef, function(error, data) {if (error) {// an error occurred while attempting loginconsole.log(error);} else if (user) {// user authenticated with Firebaseuser = data; console.log(‘User ID: ‘ + user.id + ‘, P

  • sgrove
    google-chrome-extension firebase content-security-policy
    I’m trying to use Firebase in a Chrome extension background page, but it looks like it’s executing inline-scripts, which isn’t allowed because of security concerns.I’ve currently set the CSP to:{“content_security_policy”: “script-src ‘self’ https://cdn.firebase.com https://<my-subdomain>.firebaseio.com; object-src ‘self'”}I’m able to load the initial Firebase script, but upon calling new Firebase(‘my-firebase-url’), I get the following error:Refused to execute inline script because it viol

  • Josh Lee
    google-chrome-app mathjax content-security-policy
    I am trying to use MathJax in Chrome Packaged app. It is not loading at all giving the following error :Uncaught EvalError: Refused to evaluate a string as JavaScript because ‘unsafe-eval’ is not an allowed source of script in the following Content Security Policy directive: “default-src ‘self’ chrome-extension-resource:”.How can I make it work?EDITIT is showing this line to be the problem in the libraryvar CONSTRUCTOR = function () {return new Function (“return arguments.callee.Init.call(this,a

  • Mike West
    javascript onload content-security-policy
    Do not understand the the effect of the policy I specify at my site http://pcrypt.org/dev/groups.php.header(“X-Content-Security-Policy: allow ‘self’; img-src *; script-src ‘self’; frame-src ‘self’; style-src ‘self’;”);If I disallow inline scripts how do I then call a function. In the page I have tried to call a function located in a js file on the server from onload (body onload=’initialize()’) but it generate this error (sorry in Danish):Advarsel: CSP: Directive “inline script base restriction”

Web site is in building