Refreshing browser doesn't reflect UI changes because of Manage Versions - google-apps-script

I'm new to Google Apps Script. I'm working my way through some simple example code, putting together a very simple UI in the Script Editor. After I add each element, I'd like to be able to refresh the browser view to see the latest update. (I'm publishing the script as a Web App.)
So, I add an element to the Ui via script, save my script, and then refresh the browser window. (I've already saved a version and published the script, so I already have a browser window open with that url.) The update is not reflected after the refresh.
It seems the reason is because I didn't save a new version after making the change. If I save a new version, publish the new version, and THEN refresh, I do see the latest version of the UI.
Saving a new version and re-publishing is a very slow way to review my changes as I make them. Is there some other way to preview Ui changes without having to slog through these steps? I'm not using the GUI Builder, just writing code.
I see the advantage of version management in the bigger picture, but for my situation it makes things quite cumbersome!
I did see a post from June that seemed to ask the same question (How to quickly test saved code in Google Sites?) and there wasn't a solution offered, but I'm not sure if there were other factors in his code that wouldn't apply to me.
Thank you! Carrie

There is a "special" url for that... so you see your changes directly when you save the script.
see screen captures below, it shows up in both screens.

Related

Google Apps Script works in \dev but no in \exec mode

First I have to apologize because English is not my native language and also because I'm just starting in developing. Sorry for all of that.
My question is that when I deploy my app script as a web app the page does not work; but when I used the "Test web app for your latest code" it does work. I don't understand why in the first case (the url finishes with a \exec) appears an error and in the second works nice (the url finishes with a \dev).
The Google Drive error is : The file cannot be opened at this time. Please check the address and try again.
I'm so confused because the web app was working nice, and suddenly it started to show that error, but I did not change anything in the code.
I don´t know if it is related with permissions. I've tried to create new versions but it does not solve it.
Any idea how can I solved it?

Microsoft Translator Service sample app not working

When open the sample app from the link provided here, the sample opens as shown below. I then enter the Translator service key in the first input box. But when I click on the Get Languages button to select a language, the entire sample app disappear. I tried it several times but to no avail. I'm using Windows-10 Pro 1903
Question: What I may be missing here and how can we make it work?
this seems like a bug in our Sample App? It'd be great if you can file an issue on our GitHub repo here for tracking and resolution.
You could also try cloning our repo to build the sample app locally, see video about setting that up here, that way you could see the actual exception occurring and provide a bit more detail in the issue (or see what needs to be fixed and submit a PR).
Thanks!

Unable to add new script in Adwords since new update

I've been a passive StackOverflow user for more than a decade now. I don't really think this is the place to ask this but Google Developers Help page referred me here.
Adwords has been updating to a beta version and I'm a heavy user of its Scripts console, but recently, when I want to ad a new script with the big red button, it starts loading and then this message displays: "There was a problem loading the script. Please try again later"
I've already tried with Chrome and Safari, a cookieless browser and with a different account and nothings seems to work. I also Google the error and there is nothing. I don't think I'm the only person experiencing this, do you have any solution?
I couldn't reproduce your problem and was able to create scripts—however, I've noticed quite a lot of bugs in the new web interface (to be fair, they say it's still in beta).
But as a workaround, just use the Return to previous AdWords link in the three dot option menu, which will take you back to the old interface. I could well imagine that you'll be able to add a new script there.

Chrome Extension Plugin Ability?

I am building an extension for Chrome which gives the user a basic API. I would like for other developers to have the ability to add functions of their own to my API. For example, some developers offer a new "plugin" (which is only JavaScript code), and I want users to be able to download that plugin into their extension.
The main problem I'm facing is this:
How do you load new code into an extension permanently?
Ideally I would like to add code into the extension's JavaScript, but I have no way to write to the file; I am under the impression that I am restricted by JavaScript - is this true?
While I could perhaps load new code dynamically (by downloading some script), that code will only hold for the current run, and is not added permanently. Rather, it is gone once the user reloads the extension.
The only solution I can see so far is to create a login system where I save each user's downloaded plugins and give him the mandatory option to load them every time he opens the extension.
This method is very messy and impractical, because I don't want to make a user login every time. In fact, I would very much like to refrain from using any login system whatsoever.
What I desire is something similar to what the GreaseMonkey extension does, which is the ability to let users write scripts and allow other users to be able to download them.
I'm obviously looking to create an extension which is much smaller and simpler than GreaseMonkey, but something like GreaseMonkey is more or less what I am looking for.
Any thoughts or suggestions?
All of the "plugins" will be independent chrome extensions. You can then use Message Passing to send a message to every installed extension and the ones that are plugins should have code that goes something like:
if recieve "some identifying key"
then respond "information about this plugin"
Now your main extension knows what plugins are installed and can load their JS files using chrome-extension://[extensionID]/file.js".
That should get you started :)

Chrome Extension Development - need help getting started

I'd like to try my hand at some Chrome Extension Development. The most I have done with extensions is writing some small Greasemonkey scripts in the past.
I would like to use localStorage to store some data and then reveal the data on a extension button click later on. (Its seems like this would be done with a popup page)
How do I run a script everytime a page from lets say http://www.facebook.com/* is loaded?
How do I get access to the page? I think based off my localStorage requirement I would have to go down the background_page route (correct?) Can the background page and popup page communicate across the localStorage?
UPDATE:
I'm actually looking to learn the "Chrome way". I'm not really looking to run an existing Greasemonkey script
Google actually has some pretty good documentation on creating extensions. I recommend thoroughly reading the following two articles if you haven't already done so:
http://code.google.com/chrome/extensions/getstarted.html
http://code.google.com/chrome/extensions/overview.html
If you want to give your extension access when the user browses to Facebook, you'll need to declare that in the extension's manifest.
Unless you're wanting to save data beyond the life of the browser process, you probably don't need to use local storage. In-memory data can just be stored as part of the background page.
Content scripts (which run when you load a page) and background pages (which exist for the duration of the browser process) can communicate via message passing, which is described here:
http://code.google.com/chrome/extensions/messaging.html
Overall, I'd suggest spending some time browsing the Developer's Guide and becoming familiar with the concepts and examples.
Chrome has a feature to automatically convert greasemonkey scripts to extensions!