Writing inline JavaScript inside a Sitefinity widget is one of the slowest feedback loops the platform hands you. Type a few lines into the JavaScript widget, save, wait for the page to come back, preview, spot the typo, do it again. My RandomSiteControls ships a better JavaScript widget than the stock one, but it does not fix the real problem, which is that every single change costs you a save and a reload of the editor.

Widget templates are not the escape hatch people think they are. You still save and reopen for every tweak, and if you work through Thunder you will eventually hit the bug where you save a template, the change silently does not apply, and you burn twenty minutes debugging code that was never actually deployed. It tends to happen after you have built the site with a template open, then go back to edit and resave it. That one has been sitting in Thunder unfixed for as long as I can remember.

The move that actually works is to stop editing in the CMS at all. Point the page at a file in your Dropbox and edit that file locally in a real editor.

  1. In Dropbox, right click the script, choose Share, and copy the link.
  2. In the Sitefinity JavaScript widget, paste the link on the first tab.
  3. Change the end of the URL from dl=0 to dl=1. That flag tells Dropbox to serve the raw file instead of the HTML page with a download button on it. Miss it and you are loading a webpage where your script should be.

Now the loop is save the .js, reload the page. Dropbox syncs faster than you can alt-tab and hit refresh, so the file is already current by the time the page finishes loading.