you are accessing a JS resource on a different domain which will I think be being blocked by the CSP. Try with a local copy of that jquery.min.js so you access it the same way as your own JS file.
did you look in the browser console (wich should tell you what the problem is)?
Do you mean the jQuery file? Because I copied it into a local js file for exactly that reason in the test above. This should be the case for all my js files, so I don’t know which one you mean
hmm, couldn’t even get SimpleSAFE working, I looked through the code and couldn’t find any variable called “permission” or anything similar. All of the JSON auth data (app name, id, etc) was filled out correctly in the SimpleSAFE js file.
This is the result of uploading through the Demo App and running on Firefox (also, here’s the safe:// link for it):
Never updated my first version of “simple_safe.js” and this is why that one works:
// Create the payload that will be sent with the request
var payload = {
app: {
name: "Simple SAFE API example",
version: "1.0.0",
vendor: "your_name",
id: "your_app_id"
},
permissions: ["SAFE_DRIVE_ACCESS"]
};
You’re right, there was a bug in my code. For some reason I removed the permission parameter when I created the github repo. I updated it, it should work now. Here’s the link.
Noticing ‘json’-elements “name”, “version”, “vendor” and “id” in function “authorize” now being different in “simple_safe.js”, probably helpful for anyone following these steps to repeat this from the sister-forum here:
I can change the App name & version just fine, but as soon as I change the vendor to anything but “MaidSafe” then it won’t give SAFE_DRIVE_ACCESS and my public/ & private/ folders or any of my data won’t be available below.
I noticed it too. What I understand is that the SafeLauncher use a mix of the App vendor and the App id to create a unique directory structure. You can change the app name and the app version and still access the same data structure. I read somewhere they did it that way to allow an app maker to create multiple apps that uses the same data structure to share data among them.
So when you change the vendor and the id you are effectively creating a whole new data structure with nothing in it.
How hard do you guys think it would be to make the current SAFE email tutorial into a web page / web app so people could just go to it in the browser instead of the electron desktop software?
Integrating electron’s js codebase into js that could run from a webpage?
Are we expecting to see PUT and other apparently normal REST API options?.. to allow then overwrite on files. I see there is a PUT for register new service, though confused atm why that is not also POST.
I suppose PUT must be a simple compound of DELETE and POST but would be useful to just overwrite files in a single request. If there’s a risk of the DELETE failing perhaps it’s better that devs think to check each step has seen 200 successful.
How hard do you guys think it would be to make the current SAFE email tutorial into a web page / web app so people could just go to it in the browser instead of the electron desktop software?
Integrating electron’s js codebase into js that could run from a webpage?
Sounds like s great little learning project for someone
I would not try to port electron stuff though, that’s a lot more work and not likely to be performant.
Better to simplify by stripping the app down to bare minimum, then enhance the look and feel later. In Beaker, with safe-js, you have access to the low level API so it should be a matter of copying the logic, rewriting anything that relies on electron, and building a new user interface.
@DavidMtl is there a version of SafeEditor that works with the new paradigm (safe-js / beaker 0.3.6-2+)? Really miss being able to edit my SAFE code automatically :,(
There isn’t for now. I was planning on waiting for things (API, permission) to settle a bit before investing more time into it but I’ll see what I can do tonight.