Web Maker

weavemaker

All of us use the web in different ways. At Mozilla, we are dedicated to helping you build a web that is relevant to your friends, family, business or community. Breathtaking fast & offline web playground in your browser.

How to build a quick, off-line frontend gaming experience with Web Maker

The Web Maker is a chest expansion that offers you a flaming quick and off-line frontend in your web navigator ?right?right. There was also an expansion of the homepage in the webstore. Twice! Web Maker lets you use HTML, JavaScript and CSS directly in your webbrowser without an outside text processor or special settings.

As a frontend designer, you've probably tried one or more of the following play-grounds of code: there - like CodePen, JSBin, JSFiddle - to to find out about problems with your coding, or to talk about excerpts and parts of your logics with your peers. Now I could go with conventional editors and browsers thing, but that does require a little set-up. That'?s how Web Maker was made.

Web Maker's first release was very easy. There were three editing section (which were CodeMirror instances) for HTML, JavaScript and CSS. Click on the "Edit" button. Every time the source tree was refreshed, it was merged into an HTML text with everything placed in-line. Because it was still in its infancy, I wanted a very easy Web Maker redistribution plattform.

So I decided to make it a Chrom expansion, so I decided to make it a Chrom expansion. Using the Web Store is child's play.

The captureVisibleTab uses the captureVisibleTab APII to get the thumbnail of the thumbnail frame, and then the captureVisibleTab APII to get it for you to click a pushbutton to get it. I' ve worked with JavaScript-frames like Angular and Vue in small and large apps. For Web Maker, however, I chose to take vanilla to test myself and see how far I could go without a shell until the code base became spam.

Using all the wisdom I have acquired by working with these framework and library, I wanted to make the coding healthy, organised and DRY. Like most of the project, I began with a simple JavaScript. js JavaScript filename. In order to keep the source base simple and organised, I have shifted large standalone pieces of chunking from it into seperate pieces (e.g. sutils. js and dropdown.js).

Hint: I could not use ink line script like click orchange. They are not permitted in charge of safety in charge of changing chromes. Even with CSS, Web Maker only trusts in functions provided by the webbrowser, such as custom functions. Because I' ve designed Web Maker only for Chromes, I can confidently use new coming functionality without having to worry about the cross-browser ?another-?another to create a Chromes app.

Like I said before, the ultimate pre-view in the first release of the application was just an HTML character set containing the user's customspss as inlined style tags and the user's JavaScript as integrated script tags. This HTML character chain was stored in a HTML temp folder that was uploaded to an IFRAM.

HTML looks like this: Users HTML here... Users html here..... Web Maker 0 I found out that on Crome Canary ( at this point v57) the previews no longer executed the user's JavaScript. I found a chromes rule bug in the development panel during the check that says:

Now I already knew that the Content Security Policy (CSP) did not allow me to insert multiline scripting into the mark-up of a chromed expansion, and I had all my JavaScript in seperate sets. The CSP had begun to refer to the previews of frames fromrome 57 onwards. This was done by moving the user's JavaScript from online to a JavaScript spreadsheet.

Therefore I have revised the logics and now with each update the JavaScript of the users is saved in a buffer. It will then be uploaded to the Preview-IFrame. Please notice that the thumbnail frame is not updated every time you press a button in the text area. This update is denied on the account ?so-?so, the previews are only updated if the account holder does not write for a while.

Otherwise it would lead to many unneeded upgrades while entering by the users. In contrast to HTML and JavaScript, where the entire isframe is updated, when it is processed in the HTML and JavaScript styles tags, it always does so. It is not necessary to write files or update iframes. Therefore, updating the previews of your site is much quicker with CSS.

Like I said before, the previews are updated as soon as the users stop tapping. Here it is possible that the current visitor has stopped while creating a JavaScript script cycle, resulting in a subform. There is no increment/decrement constraint on this page JavaScript - so, if set in the IFRAM, the browsers table would suffocate!

These cases must be avoided by a playing field like Web Maker. To do this, Web Maker analyzes the user's JavaScript and changes all looping so that each one constantly checks to see if it didn't take too long. As with most frontend playgrounds, Web Maker provides many pre-processors for each HTML, JavaScript and JavaScript.

To add a pre-processor to the application, you need to get your own transparent (source-to-source) and understand how it transposes the editode. Now, almost all on-line gaming sites out there transport your codes on their servers. However, Web Maker has no ?it?it sitting in your web browser and running in your webbrowser.

A lot of porters are only intended for use in a NodesJS setting, so I tried to make them available in browser-compatible source codes. The Web Maker uses transparent files like CoffeeScript, SASS and Babel. Every time the changes are made in the Notepad, the UI is sent to the appropriate transponder, and then the transposed UI is sent to the previewer.

There are two main reason why I used a promise-based programming interface to transpose code: This uses a workman to translate the SASS source text to HTML on a seperate threads. Or I could move other transponders to a different employee. Therefore, it is better to move them to a seperate employee. So for example the JavaScript converting feature looks in a broader sense: var d = deferred(); code= CoffeeScript. compile (code, { bare: true:));'js', ); d. resolve(code); release 2.

Web Maker 0 comes with a very important feature for saving users' work. So even if you're working on a different computer, you can still remember all your Web Maker preferences, such as feed sizes, designs, and so on. You can also use Web Maker to create, download and print all your stored designs.

Based on several great open sources, Web Maker is itself open as well. CodeMirror creates the three edit windows in which you enter the text. The CodeMirror comes with a variety of add-ons and modi that allow Web Maker to provide features such as auto-completion, convolution, syntax hightlighting, and topics.

Esprima allows you to see JavaScript bugs in your generated JavaScript while typing in the textbox. Also, Web Maker uses Split. js, Hint. js, Emmet, Inlet. js, and even Web Maker! Yes, Web Maker is created within Web Maker. I found a big break in Chrome 57 that cracked the capability to insert custom scripting into the extension's mark-up.

A function delivered with 2.0 also existed that permitted the end users to include any number of JavaScript or JavaScript outside files. Each time the avatar submits a JavaScript librarian Web site address, it is added as a JavaScript day with the avatar specified as the Web site address (src) flag. In addition to inhibiting the use of In-Line JavaScript, the chromes enhancement CSP also limits the ability to download domaines, except those listed on CSP - which, which means that the users cannot download JavaScript from any arbitrary database.

Currently this is partly resolved by a whitelist of all important CDs in the json manual. It is still not perfectly usable because the users cannot use JavaScript from another domains. One other big thing that impressed me was the previews of the screenshots. With this function, the operator can create a screenshots of the actual previews and click on a picture icon to get it.

Here is what it looks like during the installation of the extension: This first line is quite frightening for anyone who installs the expansion. Also, if you are adding a new privilege set for a new release of an enhancement, Chrome will disable the existing enhancement and display a pop-up indicating that the enhancement needs a new privilege set. That alerted some people who had already Web Maker up and running.

When it comes to ease of use, functionality and acceptance, Web Maker has come a long way. It can also be used by pros and novices in areas where the web is slowly or not at all available. In addition, Web Maker is open Source, so everyone is welcome to suggest and deploy functions they think might be useful.

This could be your first move towards learning some handy JavaScript through contributions.

Mehr zum Thema