[SOLVED] Using async/await inside initialize()

Just tried this with TamperMonkey on Chrome: Tampermonkey - Chrome Web Store

// ==UserScript==
// @name         PlayCanvsa JS Hint Update
// @namespace    http://stevenyau.co.uk/
// @version      0.1
// @description  Update JS Hint to latest
// @author       Steven Yau
// @match        https://playcanvas.com/editor/code/*
// @icon         https://playcanvas.com/static-assets/images/icons/favicon.png
// @grant        none
// ==/UserScript==

(function() {
    (function(){var t=document.createElement("script");t.src="https://jshint.com/res/jshint/dist/jshint.js",t.onload=function(){var t;(t=editor.call("editor:codemirror")).setOption("lint",!1),t.setOption("lint",!0)},document.head.appendChild(t)})();
})();

Works like a charm :slight_smile:

3 Likes

Nice! I use Tampermonkey quite often, adding it to the list :wink:

1 Like

Latest version of JS hint has been deployed, no need for these workarounds now!

6 Likes