Last active
April 25, 2017 00:55
-
-
Save iynere/0c9c6580ee5097389a16aaa00e8c7673 to your computer and use it in GitHub Desktop.
slight edits to http://moonconnection.com/moon_module.phtml js to force https, so chrome doesn't complain (ex: https://isar0se.github.io/moon-module-ex)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* if you're trying to embed this on your blog or website: | |
0. generate yr embed code as usual from https://moonconnection.com/moon_module.phtml | |
- replace the js file path with this one | |
1. use https://rawgit.com to spoof headers | |
- full url for this file is https://cdn.rawgit.com/isar0se/0c9c6580ee5097389a16aaa00e8c7673/raw/35dea55bce3955524d29d2024d7b6a06b4e32ce0/ccm_fl.js | |
- if you try to past the raw file url in directly, the content type will be 'plain text' not 'javascript' or w/e | |
2. chrome disables flash autoplay by default & there's no way to un-disable it | |
- the moon embed is annoying if there's a play button | |
- but if you bump the embed width* to something like 700 at least (not sure the exact cutoff), chrome assumes it's content & not advertising & allows autoplay | |
- autoplay is enabled via the '&autoPlay=true' param in the FlashVars string | |
* the FLASH embed width (fw:xxx, fh:xxx) is what controls this, altho you'll want to bump the width of the actual <div> too so it won't look funny */ | |
ccm_cfg.u = (ccm_cfg.u?ccm_cfg.u:''); ccm_cfg.tk = (ccm_cfg.tk?ccm_cfg.tk:''); if(ccm_cfg.u=='gm') { ccm_cfg.fn = 'ccm_h1_f6.swf'; } if(!ccm_cfg.pth) { ccm_cfg.pth='https://www.moonmodule.com/cs/'; } if(!ccm_cfg.bgc && ccm_cfg.bg) { ccm_cfg.bgc=ccm_cfg.bg; } var ccm_fl_js = ccm_cfg.js==undefined?'-1':ccm_cfg.js; var ccm_fl_msp = ccm_cfg.msp==undefined?'-1':ccm_cfg.msp; var ccm_fl_hst = location.hostname; var ccm_fl_url = location.href; var ccm_fl_embed = '<embed allowScriptAccess="never" src="https://www.moonmodule.com/cs/ccm_h1_f6.swf" FlashVars="lg='+ccm_cfg.lg+'&hs='+ccm_cfg.hs+'&tf='+ccm_cfg.tf+'&scs='+ccm_cfg.scs+'&df='+ccm_cfg.df+'&dfd='+ccm_cfg.dfd+'&tc='+ccm_cfg.tc+'&bgc='+ccm_cfg.bgc+'&mc='+ccm_cfg.mc+'&js='+ccm_fl_js+'&msp='+ccm_fl_msp+'&u='+ccm_cfg.u+'&tk='+ccm_cfg.tk+'&hst='+ccm_fl_hst+'&url='+encodeURI(ccm_fl_url)+'&autoPlay=true" quality="high" width="'+ccm_cfg.fw+'" height="'+ccm_cfg.fh+'" bgcolor="#'+ccm_cfg.bgc+'" name="ccm_mph_mod" align="middle" wmode="opaque" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" />';document.write(ccm_fl_embed); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment