Just kidding... hello world.
13 | 14 | 15 | -------------------------------------------------------------------------------- /public/config.js: -------------------------------------------------------------------------------- 1 | let token, userId; 2 | 3 | const twitch = window.Twitch.ext; 4 | 5 | twitch.onContext((context) => { 6 | twitch.rig.log(context); 7 | }); 8 | 9 | twitch.onAuthorized((auth) => { 10 | token = auth.token; 11 | userId = auth.userId; 12 | }); 13 | -------------------------------------------------------------------------------- /public/helper.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('message', (event) => { 2 | console.log(event); 3 | }); 4 | //debugger; 5 | //const local = window.frameElement.attributes.getNamedItem('helperUrl'); 6 | //const online = 'https://extension-files.twitch.tv/helper/v1/twitch-ext.min.js'; 7 | //const el = document.createElement('script'); 8 | //el.src = local ? local.value : online; 9 | //document.head.appendChild(el); 10 | -------------------------------------------------------------------------------- /public/jquery-3.3.1.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */ 2 | !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&nWould you care to cycle a color?
13 |