mirror of
https://github.com/vrana/adminer.git
synced 2025-08-22 14:12:51 +02:00
MariaDB: Links to documentation in syntax highlighting
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
|
||||
/** Load syntax highlighting
|
||||
* @param string first three characters of database system version
|
||||
* @param [boolean]
|
||||
*/
|
||||
function bodyLoad(version) {
|
||||
function bodyLoad(version, maria) {
|
||||
if (window.jush) {
|
||||
jush.create_links = ' target="_blank" rel="noreferrer noopener"';
|
||||
if (version) {
|
||||
@@ -12,8 +13,14 @@ function bodyLoad(version) {
|
||||
if (typeof obj[key] != 'string') {
|
||||
obj = obj[key];
|
||||
key = 0;
|
||||
if (maria) {
|
||||
for (var i = 1; i < obj.length; i++) {
|
||||
obj[i] = obj[i].replace(/\.html/, '/');
|
||||
}
|
||||
}
|
||||
}
|
||||
obj[key] = obj[key]
|
||||
.replace(/dev\.mysql\.com\/doc\/mysql\/en\//, (maria ? 'mariadb.com/kb/en/library/' : '$&')) // MariaDB
|
||||
.replace(/\/doc\/mysql/, '/doc/refman/' + version) // MySQL
|
||||
.replace(/\/docs\/current/, '/docs/' + version) // PostgreSQL
|
||||
;
|
||||
|
Reference in New Issue
Block a user