From ed2bfbd27c6a0cb2924a1c15e487e7e676169d0c Mon Sep 17 00:00:00 2001 From: n1474335 Date: Thu, 27 Jul 2017 15:33:01 +0000 Subject: [PATCH 1/3] Added structured data to help search engines --- src/web/html/index.html | 7 ++++++- src/web/static/structuredData.json | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 src/web/static/structuredData.json diff --git a/src/web/html/index.html b/src/web/html/index.html index 315e4c3a..34c0958a 100755 --- a/src/web/html/index.html +++ b/src/web/html/index.html @@ -26,7 +26,7 @@ CyberChef - + @@ -76,6 +76,11 @@ changeLoadingMsg(); window.loadingMsgsInt = setInterval(changeLoadingMsg, (Math.random() * 1000) + 1000); + <% if (!htmlWebpackPlugin.options.inline) { %> + + <% } %> diff --git a/src/web/static/structuredData.json b/src/web/static/structuredData.json new file mode 100644 index 00000000..08677281 --- /dev/null +++ b/src/web/static/structuredData.json @@ -0,0 +1,23 @@ +[ + { + "@context": "http://schema.org", + "@type": "Organization", + "url": "https://gchq.github.io/CyberChef/", + "logo": "https://gchq.github.io/CyberChef/images/cyberchef-128x128.png", + "sameAs": [ + "https://github.com/gchq/CyberChef", + "https://www.npmjs.com/package/cyberchef" + ] + }, + { + "@context": "http://schema.org", + "@type": "WebSite", + "url": "https://gchq.github.io/CyberChef/", + "name": "CyberChef", + "potentialAction": { + "@type": "SearchAction", + "target": "https://gchq.github.io/CyberChef/?op={operation_search_term}", + "query-input": "required name=operation_search_term" + } + } +] From 7a56af8ffaa981e437d8e478d835d11c396fddb4 Mon Sep 17 00:00:00 2001 From: n1474335 Date: Thu, 27 Jul 2017 15:33:24 +0000 Subject: [PATCH 2/3] Page title changes to reflect recipe --- src/web/App.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/web/App.js b/src/web/App.js index ec0ed578..2880b8ac 100755 --- a/src/web/App.js +++ b/src/web/App.js @@ -666,10 +666,20 @@ App.prototype.alertCloseClick = function() { App.prototype.stateChange = function(e) { this.autoBake(); + // Set title + const recipeConfig = this.getRecipeConfig(); + let title = "CyberChef"; + if (recipeConfig.length === 1) { + title = `${recipeConfig[0].op} - ${title}`; + } else if (recipeConfig.length > 1) { + title = `${recipeConfig.length} operations - ${title}`; + } + document.title = title; + // Update the current history state (not creating a new one) if (this.options.updateUrl) { - this.lastStateUrl = this.manager.controls.generateStateUrl(true, true); - window.history.replaceState({}, "CyberChef", this.lastStateUrl); + this.lastStateUrl = this.manager.controls.generateStateUrl(true, true, recipeConfig); + window.history.replaceState({}, title, this.lastStateUrl); } }; From 559c13a0035036b1356b733dfd89e7ee46b8c782 Mon Sep 17 00:00:00 2001 From: n1474335 Date: Fri, 28 Jul 2017 16:44:48 +0100 Subject: [PATCH 3/3] 5.12.2 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index c8e87320..c9792eda 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cyberchef", - "version": "5.12.1", + "version": "5.12.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 208789bd..c36af66a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cyberchef", - "version": "5.12.1", + "version": "5.12.2", "description": "The Cyber Swiss Army Knife for encryption, encoding, compression and data analysis.", "author": "n1474335 ", "homepage": "https://gchq.github.io/CyberChef",