mirror of
https://github.com/crypto-pro-web/crypto-pro-js.git
synced 2024-11-24 00:55:00 +03:00
Обновил adesplagin_api.js до 2.3.2 (#26)
This commit is contained in:
parent
484c1148ea
commit
652cc4d23e
23
src/vendor/cadesplugin_api.js
vendored
23
src/vendor/cadesplugin_api.js
vendored
@ -13,6 +13,7 @@
|
|||||||
var isYandex = 0;
|
var isYandex = 0;
|
||||||
var canPromise = !!window.Promise;
|
var canPromise = !!window.Promise;
|
||||||
var cadesplugin_loaded_event_recieved = false;
|
var cadesplugin_loaded_event_recieved = false;
|
||||||
|
var isFireFoxExtensionLoaded = false;
|
||||||
var cadesplugin;
|
var cadesplugin;
|
||||||
|
|
||||||
if(canPromise)
|
if(canPromise)
|
||||||
@ -236,6 +237,14 @@
|
|||||||
cadesplugin.XCN_CRYPT_STRING_BASE64HEADER = 0;
|
cadesplugin.XCN_CRYPT_STRING_BASE64HEADER = 0;
|
||||||
cadesplugin.AT_KEYEXCHANGE = 1;
|
cadesplugin.AT_KEYEXCHANGE = 1;
|
||||||
cadesplugin.AT_SIGNATURE = 2;
|
cadesplugin.AT_SIGNATURE = 2;
|
||||||
|
|
||||||
|
cadesplugin.CARRIER_FLAG_REMOVABLE = 1;
|
||||||
|
cadesplugin.CARRIER_FLAG_UNIQUE = 2;
|
||||||
|
cadesplugin.CARRIER_FLAG_PROTECTED = 4;
|
||||||
|
cadesplugin.CARRIER_FLAG_FUNCTIONAL_CARRIER = 8;
|
||||||
|
cadesplugin.CARRIER_FLAG_SECURE_MESSAGING = 16;
|
||||||
|
cadesplugin.CARRIER_FLAG_ABLE_VISUALISE_SIGNATURE = 64;
|
||||||
|
cadesplugin.CARRIER_FLAG_VIRTUAL = 128;
|
||||||
}
|
}
|
||||||
|
|
||||||
function async_spawn(generatorFunc) {
|
function async_spawn(generatorFunc) {
|
||||||
@ -482,10 +491,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function firefox_or_safari_nmcades_onload() {
|
function firefox_or_safari_nmcades_onload() {
|
||||||
|
if (window.cadesplugin_extension_loaded_callback)
|
||||||
|
window.cadesplugin_extension_loaded_callback();
|
||||||
|
isFireFoxExtensionLoaded = true;
|
||||||
cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);
|
cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
function nmcades_api_onload () {
|
function nmcades_api_onload() {
|
||||||
|
if (!isIE() && !isFireFox && !isSafari) {
|
||||||
|
if (window.cadesplugin_extension_loaded_callback)
|
||||||
|
window.cadesplugin_extension_loaded_callback();
|
||||||
|
}
|
||||||
window.postMessage("cadesplugin_echo_request", "*");
|
window.postMessage("cadesplugin_echo_request", "*");
|
||||||
window.addEventListener("message", function (event){
|
window.addEventListener("message", function (event){
|
||||||
if (typeof(event.data) !== "string" || !event.data.match("cadesplugin_loaded"))
|
if (typeof(event.data) !== "string" || !event.data.match("cadesplugin_loaded"))
|
||||||
@ -600,7 +616,8 @@
|
|||||||
return;
|
return;
|
||||||
if(isFireFox)
|
if(isFireFox)
|
||||||
{
|
{
|
||||||
show_firefox_missing_extension_dialog();
|
if (!isFireFoxExtensionLoaded)
|
||||||
|
show_firefox_missing_extension_dialog();
|
||||||
}
|
}
|
||||||
plugin_resolved = 1;
|
plugin_resolved = 1;
|
||||||
if(canPromise)
|
if(canPromise)
|
||||||
@ -692,7 +709,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Export
|
//Export
|
||||||
cadesplugin.JSModuleVersion = "2.3.1";
|
cadesplugin.JSModuleVersion = "2.3.2";
|
||||||
cadesplugin.async_spawn = async_spawn;
|
cadesplugin.async_spawn = async_spawn;
|
||||||
cadesplugin.set = set_pluginObject;
|
cadesplugin.set = set_pluginObject;
|
||||||
cadesplugin.set_log_level = set_log_level;
|
cadesplugin.set_log_level = set_log_level;
|
||||||
|
Loading…
Reference in New Issue
Block a user