add unspeakably ugly hack to user agent checker, so that the linux and mac bindings page key modifiers are 'pinned' regardless of user agent.

This commit is contained in:
Jörn Nettingsmeier 2014-02-07 01:06:55 +01:00
parent 0fed26b313
commit 070d9812da

View File

@ -62,9 +62,13 @@ page_title: The Ardour Manual
<script type="text/javascript">
if (navigator.userAgent.match(/Mac/)) {
// I'll go to hell for this
var isA = function(regex) { return navigator.userAgent.match(regex) };
var isAbout = function(regex) { return document.getElementsByTagName('h1')[1].textContent.match(regex) };
if ( (isA(/Mac/) || isAbout(/OS X/)) && (!isAbout(/Linux/)) ) {
var e = document.getElementsByTagName('body')[0];
e.className += ' mac';
e.className += ' mac'; // class magic for Cmd vs. Ctrl keys.
}
var tree = document.getElementById('tree'),