2023.05.22

This commit is contained in:
Alexander
2023-05-22 17:51:38 +03:00
parent 25335ed108
commit f323b412ad
12 changed files with 531 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
/* Скрипт для навигации по URL.
*** Автор: Александр Бабаев.
*** Версия: 0.5
*/
function openurl (url, target = 'self', params = null) {
var w_target = target;
w_target.toLowerCase;
switch (w_target) {
case 'new':
/* Открыть в новой вкладке */
window.open(url, "_blank");
break;
case 'modal':
/* Открыть в модальном окне */
var wparams = '';
if (params == null) {
wparams = 'toolbar=no, menubar=no, location=no, directories=no, status=no, width=800, height=600';
} else {
wparams = params;
}
window.open(url, "", wparams);
break;
default:
/* Открыть в текущем окне (по умолчанию) */
location.href = url;
}
return false;
}

15
anb.openurl/license.txt Normal file
View File

@@ -0,0 +1,15 @@
anb.openurl. Library for open url in JS.
Copyright (C) 2018 - 2019 by Alexander Babaev.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

8
anb.openurl/readme.txt Normal file
View File

@@ -0,0 +1,8 @@
--- anb.openurl ---
--- Версия: 1.0 ---
--- Описание: Библиотека открытия URL. ---
-- Автор: Александр Бабаев --
-- URL: https://babaev-an.ru/ --
- Лицензия: GPL3 (https://www.gnu.org/licenses/gpl.html) -