From 4130054ef3a4db41d301d25423d7f5eaddefe1ba Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Mon, 20 Jun 2016 10:15:21 -0400 Subject: [PATCH] Finish removing the AJAX indexing support. --- templates/index.html | 1 - util/phantomjs-runner.js | 55 ---------------------------------------- 2 files changed, 56 deletions(-) delete mode 100644 util/phantomjs-runner.js diff --git a/templates/index.html b/templates/index.html index fcd2212c1..b103efb4d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -10,7 +10,6 @@ - {% if aci_conversion %} diff --git a/util/phantomjs-runner.js b/util/phantomjs-runner.js deleted file mode 100644 index fae6496e0..000000000 --- a/util/phantomjs-runner.js +++ /dev/null @@ -1,55 +0,0 @@ -var system = require('system'); -var url = system.args[1] || ''; -var count = 0; - -if(url.length > 0) { - var page = require('webpage').create(); - page.open(url, function (status) { - try { - if (status == 'success') { - var delay; - var checker = (function() { - count++; - - if (count > 100) { - console.log('Not Found'); - phantom.exit(); - return null; - } - - var html = page.evaluate(function () { - var found = document.getElementsByTagName('html')[0].outerHTML || ''; - if (window.__isLoading && !window.__isLoading()) { - return found; - } - if (found.indexOf('404 Not Found') > 0) { - return found; - } - return null; - }); - - if (html) { - if (html.indexOf('404 Not Found') > 0) { - console.log('Not Found'); - phantom.exit(); - return; - } - - clearTimeout(delay); - console.log(html); - phantom.exit(); - } - }); - delay = setInterval(checker, 100); - } else { - console.log('Not Found'); - phantom.exit(); - } - } catch (e) { - console.log('Not Found'); - phantom.exit(); - } - }); -} else { - phantom.exit(); -} \ No newline at end of file