Permalink
Browse files

Updated the app code to use the config values set by the user

  • Loading branch information...
1 parent c35caf3 commit 7a3ba04441986b1d0478d1ccd14ce1eca377adc3 @ram-nadella ram-nadella committed May 2, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 public/javascripts/dnschanger_detector.js
@@ -1,4 +1,4 @@
-CloudFlare.define("dnschanger_detector", ["cloudflare/dom"], function(dom){
+CloudFlare.define("dnschanger_detector", ["cloudflare/dom", "cloudflare/config"], function(dom){
window.dnsChangerPresent = function(){
var message = dom.createElement("div");
dom.setAttribute(message, "style", 'z-index: 100000; width:100%; text-align:center; position: absolute; top: 0; left: 0; margin: 0 0 20px 0; padding: 10px; background-color: #f0f0f0; color: #404040; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; border-bottom: 1px solid #a5a5a5;');
@@ -8,7 +8,8 @@ CloudFlare.define("dnschanger_detector", ["cloudflare/dom"], function(dom){
message.appendChild(warning);
var info = dom.createElement("p");
dom.setAttribute(info, "style", 'font-size: 12px;');
- info.innerHTML = 'Please visit <a href="http://www.dcwg.org/fix/" target="blank">http://www.dcwg.org/fix/.</a> for help fixing your DNS. <strong>You may lose access to the Internet after July 9, 2012 if you don\'t fix this.</strong><br/> For additional information regarding the DNS changer malware, please visit the <a href="http://www.fbi.gov/news/stories/2011/november/malware_110911" target="blank">FBI\'s website</a>.<br/> <span class="powered">DNS Changer warning powered by <a href="http://www.cloudflare.com/">CloudFlare</a>.</span></p>';
+ var fix_url = ('fix_url' in config && fix_url !== "")? config.fix_url : "http://www.dcwg.org/fix/";
+ info.innerHTML = 'Please visit <a href="'+ fix_url +'" target="blank">'+ fix_url +'</a> for help fixing your DNS. <strong>You may lose access to the Internet after July 9, 2012 if you don\'t fix this.</strong><br/> For additional information regarding the DNS changer malware, please visit the <a href="http://www.fbi.gov/news/stories/2011/november/malware_110911" target="blank">FBI\'s website</a>.<br/> <span class="powered">DNS Changer warning powered by <a href="http://www.cloudflare.com/">CloudFlare</a>.</span></p>';
message.appendChild(info);
document.body.appendChild(message);
}

0 comments on commit 7a3ba04

Please sign in to comment.