Skip to content

Commit 37f164f

Browse files
committed
Merge branch 'master' of github.com:gchq/CyberChef
2 parents 7a2f071 + 559c13a commit 37f164f

File tree

5 files changed

+43
-5
lines changed

5 files changed

+43
-5
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cyberchef",
3-
"version": "5.12.1",
3+
"version": "5.12.2",
44
"description": "The Cyber Swiss Army Knife for encryption, encoding, compression and data analysis.",
55
"author": "n1474335 <[email protected]>",
66
"homepage": "https://gchq.github.io/CyberChef",

src/web/App.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,10 +666,20 @@ App.prototype.alertCloseClick = function() {
666666
App.prototype.stateChange = function(e) {
667667
this.autoBake();
668668

669+
// Set title
670+
const recipeConfig = this.getRecipeConfig();
671+
let title = "CyberChef";
672+
if (recipeConfig.length === 1) {
673+
title = `${recipeConfig[0].op} - ${title}`;
674+
} else if (recipeConfig.length > 1) {
675+
title = `${recipeConfig.length} operations - ${title}`;
676+
}
677+
document.title = title;
678+
669679
// Update the current history state (not creating a new one)
670680
if (this.options.updateUrl) {
671-
this.lastStateUrl = this.manager.controls.generateStateUrl(true, true);
672-
window.history.replaceState({}, "CyberChef", this.lastStateUrl);
681+
this.lastStateUrl = this.manager.controls.generateStateUrl(true, true, recipeConfig);
682+
window.history.replaceState({}, title, this.lastStateUrl);
673683
}
674684
};
675685

src/web/html/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<title>CyberChef</title>
2727

2828
<meta name="copyright" content="Crown Copyright 2016" />
29-
<meta name="description" content="The Cyber Swiss Army Knife" />
29+
<meta name="description" content="The Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis" />
3030
<meta name="keywords" content="base64, hex, decode, encode, encrypt, decrypt, compress, decompress, regex, regular expressions, hash, crypt, hexadecimal, user agent, url, certificate, x.509, parser, JSON, gzip, md5, sha1, aes, des, blowfish, xor" />
3131

3232
<link rel="icon" type="image/ico" href="<%- require('../static/images/favicon.ico') %>" />
@@ -76,6 +76,11 @@
7676
changeLoadingMsg();
7777
window.loadingMsgsInt = setInterval(changeLoadingMsg, (Math.random() * 1000) + 1000);
7878
</script>
79+
<% if (!htmlWebpackPlugin.options.inline) { %>
80+
<script type="application/ld+json">
81+
<% print(JSON.stringify(require("../static/structuredData.json"))); %>
82+
</script>
83+
<% } %>
7984
</head>
8085
<body>
8186
<!-- Preloader overlay -->

src/web/static/structuredData.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[
2+
{
3+
"@context": "http://schema.org",
4+
"@type": "Organization",
5+
"url": "https://gchq.github.io/CyberChef/",
6+
"logo": "https://gchq.github.io/CyberChef/images/cyberchef-128x128.png",
7+
"sameAs": [
8+
"https://github.com/gchq/CyberChef",
9+
"https://www.npmjs.com/package/cyberchef"
10+
]
11+
},
12+
{
13+
"@context": "http://schema.org",
14+
"@type": "WebSite",
15+
"url": "https://gchq.github.io/CyberChef/",
16+
"name": "CyberChef",
17+
"potentialAction": {
18+
"@type": "SearchAction",
19+
"target": "https://gchq.github.io/CyberChef/?op={operation_search_term}",
20+
"query-input": "required name=operation_search_term"
21+
}
22+
}
23+
]

0 commit comments

Comments
 (0)