mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-06 22:47:11 -04:00
Added Google Translate dropdown to the 'Options' pane.
This commit is contained in:
parent
7e7da26f29
commit
b2cfe27a05
3 changed files with 19 additions and 0 deletions
|
@ -305,6 +305,11 @@ module.exports = function (grunt) {
|
||||||
// Add Google Analytics code to index.html
|
// Add Google Analytics code to index.html
|
||||||
content = content.replace("</body></html>",
|
content = content.replace("</body></html>",
|
||||||
grunt.file.read("src/web/static/ga.html") + "</body></html>");
|
grunt.file.read("src/web/static/ga.html") + "</body></html>");
|
||||||
|
|
||||||
|
// Add Google Translate code to index.html
|
||||||
|
content = content.replace("<!-- Google Translate placeholder -->",
|
||||||
|
grunt.file.read("src/web/static/gt.html"));
|
||||||
|
|
||||||
return grunt.template.process(content);
|
return grunt.template.process(content);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -233,6 +233,7 @@
|
||||||
<input type="number" option="auto_bake_threshold" id="auto_bake_threshold"/>
|
<input type="number" option="auto_bake_threshold" id="auto_bake_threshold"/>
|
||||||
<label for="auto_bake_threshold"> Auto Bake threshold in ms </label>
|
<label for="auto_bake_threshold"> Auto Bake threshold in ms </label>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- htmlmin:ignore --><!-- Google Translate placeholder --><!-- htmlmin:ignore -->
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" id="reset-options">Reset options to default</button>
|
<button type="button" class="btn btn-default" id="reset-options">Reset options to default</button>
|
||||||
|
|
13
src/web/static/gt.html
Normal file
13
src/web/static/gt.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
|
||||||
|
|
||||||
|
<div class="option-item">
|
||||||
|
<!-- Begin Google Translate -->
|
||||||
|
<div id="google_translate_element"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function googleTranslateElementInit() {
|
||||||
|
new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL, gaTrack: true, gaId: 'UA-85682716-2'}, 'google_translate_element');
|
||||||
|
}
|
||||||
|
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
|
||||||
|
<!-- End Google Translate -->
|
||||||
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue