Skip to content

Commit

Permalink
Updated the app code to use the config values set by the user
Browse files Browse the repository at this point in the history
  • Loading branch information
Ram committed May 2, 2012
1 parent c35caf3 commit 7a3ba04
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions public/javascripts/dnschanger_detector.js
Original file line number Diff line number Diff line change
@@ -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;');
Expand All @@ -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);
}
Expand Down

0 comments on commit 7a3ba04

Please sign in to comment.