mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 23:36:16 -04:00
BUGFIX #47: Replaced 'const' declarations with 'var' to fix iOS incompatibilities.
This commit is contained in:
parent
216d8f1f7a
commit
4d131c921a
9 changed files with 27 additions and 27 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -17,7 +17,7 @@
|
||||||
* @constant
|
* @constant
|
||||||
* @type {CatConf[]}
|
* @type {CatConf[]}
|
||||||
*/
|
*/
|
||||||
const Categories = [
|
var Categories = [
|
||||||
{
|
{
|
||||||
name: "Favourites",
|
name: "Favourites",
|
||||||
ops: []
|
ops: []
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
* @constant
|
* @constant
|
||||||
* @type {Object.<string, OpConf>}
|
* @type {Object.<string, OpConf>}
|
||||||
*/
|
*/
|
||||||
const OperationConfig = {
|
var OperationConfig = {
|
||||||
"Fork": {
|
"Fork": {
|
||||||
description: "Split the input data up based on the specified delimiter and run all subsequent operations on each branch separately.<br><br>For example, to decode multiple Base64 strings, enter them all on separate lines then add the 'Fork' and 'From Base64' operations to the recipe. Each string will be decoded separately.",
|
description: "Split the input data up based on the specified delimiter and run all subsequent operations on each branch separately.<br><br>For example, to decode multiple Base64 strings, enter them all on separate lines then add the 'Fork' and 'From Base64' operations to the recipe. Each string will be decoded separately.",
|
||||||
run: FlowControl.run_fork,
|
run: FlowControl.run_fork,
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
* @namespace
|
* @namespace
|
||||||
*/
|
*/
|
||||||
const FlowControl = {
|
var FlowControl = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constant
|
* @constant
|
||||||
|
|
|
@ -326,7 +326,7 @@ var Code = {
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
run_xpath:function(input, args) {
|
run_xpath:function(input, args) {
|
||||||
const query = args[0],
|
var query = args[0],
|
||||||
delimiter = args[1];
|
delimiter = args[1];
|
||||||
|
|
||||||
var xml;
|
var xml;
|
||||||
|
@ -343,8 +343,8 @@ var Code = {
|
||||||
return "Invalid XPath. Details:\n" + err.message;
|
return "Invalid XPath. Details:\n" + err.message;
|
||||||
}
|
}
|
||||||
|
|
||||||
const serializer = new XMLSerializer();
|
var serializer = new XMLSerializer();
|
||||||
const node_to_string = function(node) {
|
var node_to_string = function(node) {
|
||||||
switch (node.nodeType) {
|
switch (node.nodeType) {
|
||||||
case Node.ELEMENT_NODE: return serializer.serializeToString(node);
|
case Node.ELEMENT_NODE: return serializer.serializeToString(node);
|
||||||
case Node.ATTRIBUTE_NODE: return node.value;
|
case Node.ATTRIBUTE_NODE: return node.value;
|
||||||
|
@ -383,7 +383,7 @@ var Code = {
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
run_css_query: function(input, args) {
|
run_css_query: function(input, args) {
|
||||||
const query = args[0],
|
var query = args[0],
|
||||||
delimiter = args[1];
|
delimiter = args[1];
|
||||||
|
|
||||||
var html;
|
var html;
|
||||||
|
@ -400,7 +400,7 @@ var Code = {
|
||||||
return "Invalid CSS Selector. Details:\n" + err.message;
|
return "Invalid CSS Selector. Details:\n" + err.message;
|
||||||
}
|
}
|
||||||
|
|
||||||
const node_to_string = function(node) {
|
var node_to_string = function(node) {
|
||||||
switch (node.nodeType) {
|
switch (node.nodeType) {
|
||||||
case Node.ELEMENT_NODE: return node.outerHTML;
|
case Node.ELEMENT_NODE: return node.outerHTML;
|
||||||
case Node.ATTRIBUTE_NODE: return node.value;
|
case Node.ATTRIBUTE_NODE: return node.value;
|
||||||
|
|
|
@ -281,7 +281,7 @@ var StrUtils = {
|
||||||
return "Invalid regex. Details: " + err.message;
|
return "Invalid regex. Details: " + err.message;
|
||||||
}
|
}
|
||||||
|
|
||||||
const regex_filter = function(value) {
|
var regex_filter = function(value) {
|
||||||
return reverse ^ regex.test(value);
|
return reverse ^ regex.test(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ var URL_ = {
|
||||||
if (a.port) output += "Port:\t\t" + a.port + "\n";
|
if (a.port) output += "Port:\t\t" + a.port + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a.pathname) {
|
if (a.pathname && a.pathname !== window.location.pathname) {
|
||||||
var pathname = a.pathname;
|
var pathname = a.pathname;
|
||||||
if (pathname.indexOf(window.location.pathname) === 0)
|
if (pathname.indexOf(window.location.pathname) === 0)
|
||||||
pathname = pathname.replace(window.location.pathname, "");
|
pathname = pathname.replace(window.location.pathname, "");
|
||||||
|
@ -78,11 +78,11 @@ var URL_ = {
|
||||||
output += "Path name:\t" + pathname + "\n";
|
output += "Path name:\t" + pathname + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a.hash) {
|
if (a.hash && a.hash !== window.location.hash) {
|
||||||
output += "Hash:\t\t" + a.hash + "\n";
|
output += "Hash:\t\t" + a.hash + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a.search) {
|
if (a.search && a.search !== window.location.search) {
|
||||||
output += "Arguments:\n";
|
output += "Arguments:\n";
|
||||||
var args_ = (a.search.slice(1, a.search.length)).split("&");
|
var args_ = (a.search.slice(1, a.search.length)).split("&");
|
||||||
var split_args = [], padding = 0;
|
var split_args = [], padding = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue