mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 17:44:07 +02:00
Generalize JUSH URL rewriting
This commit is contained in:
@@ -19,10 +19,17 @@ function bodyLoad(version) {
|
|||||||
script.onload = function () {
|
script.onload = function () {
|
||||||
if (window.jush) { // IE runs in case of an error too
|
if (window.jush) { // IE runs in case of an error too
|
||||||
jush.create_links = ' target="_blank" rel="noreferrer"';
|
jush.create_links = ' target="_blank" rel="noreferrer"';
|
||||||
jush.urls.sql_sqlset = jush.urls.sql[0] = jush.urls.sqlset[0] = jush.urls.sqlstatus[0] = 'http://dev.mysql.com/doc/refman/' + version + '/en/$key';
|
for (var key in jush.urls) {
|
||||||
var pgsql = 'http://www.postgresql.org/docs/' + version + '/static/';
|
var obj = jush.urls;
|
||||||
jush.urls.pgsql_pgsqlset = jush.urls.pgsql[0] = pgsql + '$key';
|
if (typeof obj[key] != 'string') {
|
||||||
jush.urls.pgsqlset[0] = pgsql + 'runtime-config-$key.html#GUC-$1';
|
obj = obj[key];
|
||||||
|
key = 0;
|
||||||
|
}
|
||||||
|
obj[key] = obj[key]
|
||||||
|
.replace(/\/doc\/mysql/, '/doc/refman/' + version) // MySQL
|
||||||
|
.replace(/\/docs\/current/, '/docs/' + version) // PostgreSQL
|
||||||
|
;
|
||||||
|
}
|
||||||
if (window.jushLinks) {
|
if (window.jushLinks) {
|
||||||
jush.custom_links = jushLinks;
|
jush.custom_links = jushLinks;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user