Retrait du lien de fermeture manuelle qui ne fonctionnerait pas si la page n'a pas été ouverte par script
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ae611fd970
commit
d55b2926e8
@ -18,7 +18,8 @@
|
||||
"ms-azuretools.vscode-docker",
|
||||
"GitHub.copilot-nightly",
|
||||
"GitHub.copilot-chat",
|
||||
"Gruntfuggly.todo-tree"
|
||||
"Gruntfuggly.todo-tree",
|
||||
"eamodio.gitlens"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "nwb/multi-downloader-client",
|
||||
"description": "Client for multi-downloader-service",
|
||||
"type": "library",
|
||||
"version": "0.1.9",
|
||||
"version": "0.1.10",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Nwb\\MultiDownloaderClient\\": "src/"
|
||||
|
@ -24,12 +24,6 @@ use Nwb\MultiDownloaderClient\MultiDownloaderClient;
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#close-link {
|
||||
display: block;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@ -44,9 +38,6 @@ use Nwb\MultiDownloaderClient\MultiDownloaderClient;
|
||||
</div>
|
||||
|
||||
<div id="message"></div>
|
||||
<div id="close-link">
|
||||
<a href="javascript:void(0);" onclick="window.close();">Close this tab</a>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var messages = {
|
||||
@ -54,16 +45,10 @@ use Nwb\MultiDownloaderClient\MultiDownloaderClient;
|
||||
'fr': 'Votre téléchargement va commencer. Cette page se fermera automatiquement.'
|
||||
};
|
||||
|
||||
var closeLinkMessages = {
|
||||
'en': 'Close this page',
|
||||
'fr': 'Fermer cette page'
|
||||
};
|
||||
|
||||
var userLang = navigator.language || navigator.userLanguage;
|
||||
userLang = userLang.split('-')[0];
|
||||
|
||||
document.getElementById('message').innerText = messages[userLang] || messages['en'];
|
||||
document.getElementById('close-link').getElementsByTagName('a')[0].innerText = closeLinkMessages[userLang] || closeLinkMessages['en'];
|
||||
|
||||
document.forms['f'].submit();
|
||||
window.setTimeout(function() {
|
||||
|
Loading…
Reference in New Issue
Block a user