[Pro] HTTPS (secure form)

Walter, there appears to be a serious bug in your version 0.3 action. I took a look inside and there is no reference to Google at all. Your version 0.2 action did have a reference to Google. And although your new 0.3 action makes reference to the Freeway CDN (converting it to cloudfront), when I use your action on my page, upload, then check the HTML, there is no reference to cloudfront in the HTML at all.

Here’s a slightly modified version of your action that puts a checkbox in the Actions palette to allow the user to mute those annoying dialog boxes, but I am not sure how to modify it to fix the Freeway CDN problem and too add Google:

<action-encoding>UTF-8</action-encoding>
<page-action name="https_cdn_helper" title="HTTPS CDN Helper">
<action-version version="0.4">
HTTPS CDN Helper
Copyright 2013, 2014 Walter Davis Studio
</action-version>
<action-checkbox name="secure" title="Use HTTPS links to Google or FreewayPro CDN" default="no" />
<action-checkbox name="alerbox" title="Show altered URLs." default="no" />
<action-javascript>
function fwAfterEndHTML(){
  var scripts = fwDocument.fwTags.fwFindAll('script');
  for (var i = scripts.length - 1; i >= 0; i--){
    var script = scripts[i];
    if(fwParameters['secure'].fwBoolValue && script.src){
      if(fwParameters['alerbox'].fwBoolValue && script.src){
          alert(script.src); }
      script.src = script.src.toString().replace(/"http:/,'"https:').replace(/cdn.freewaypro.com/, 'dnk2vbhoq39rr.cloudfront.net');
    }
  };
  var links = fwDocument.fwTags.fwFindAll('link');
  for (var i = links.length - 1; i >= 0; i--){
    var link = links[i];
    if(fwParameters['secure'].fwBoolValue && link.href){
      link.href = link.href.toString().replace(/"http:/,'"https:').replace(/cdn.freewaypro.com/, 'dnk2vbhoq39rr.cloudfront.net');
    }
  };
}
</action-javascript>
</page-action>

I currently have the above version of the action applied to the top page of my site here:

Load that URL in Safari and press Opt-CMD-U to pull up the Console, then click the yellow Warnings (I see 5), and note:

[Warning] [blocked] The page at https://visionsecurity.jp/ was not allowed to run insecure content from http://ajax.googleapis.com/ajax/libs/prototype/1.7/prototype.js.

[Warning] [blocked] The page at https://visionsecurity.jp/ was not allowed to run insecure content from http://ajax.googleapis.com/ajax/libs/scriptaculous/1.9/scriptaculous.js?load=effects. (visionsecurity.jp, line 308)

[Warning] [blocked] The page at https://visionsecurity.jp/ was not allowed to run insecure content from http://cdn.freewaypro.com/carousel2/0.1.11/carousel2.js. (visionsecurity.jp, line 308)

[Warning] [blocked] The page at https://visionsecurity.jp/ was not allowed to run insecure content from http://ajax.googleapis.com/ajax/libs/scriptaculous/1.9/scriptaculous.js?load=effects.

[Warning] [blocked] The page at https://visionsecurity.jp/ was not allowed to run insecure content from http://cdn.freewaypro.com/carousel2/0.1.11/carousel2.js.

freewaytalk mailing list
email@hidden
Update your subscriptions at: