1
0
Fork 0
mirror of https://github.com/marcrobledo/RomPatcher.js.git synced 2025-06-27 16:25:54 +00:00

fix: drag and drop

This commit is contained in:
Marc Robledo 2024-08-15 08:52:27 +02:00
parent a5f57f73ba
commit 1b7521feeb
2 changed files with 10 additions and 1 deletions

View file

@ -6,7 +6,7 @@
*/
var PRECACHE_ID = 'rom-patcher-js';
var PRECACHE_VERSION = 'v30rc2b';
var PRECACHE_VERSION = 'v30rc2c';
var PRECACHE_URLS = [
'/RomPatcher.js/', '/RomPatcher.js/index.html',
'/RomPatcher.js/manifest.json',

View file

@ -508,6 +508,15 @@ var RomPatcherWeb = (function () {
return false;
}
const _dragEventContainsFiles = function (evt) {
if (evt.dataTransfer.types) {
for (var i = 0; i < evt.dataTransfer.types.length; i++) {
if (evt.dataTransfer.types[i] === 'Files')
return true;
}
}
return false;
}
const _initialize = function (newSettings, embededPatchInfo) {
/* embeded patches */
var validEmbededPatch = _checkEmbededPatchParameter(embededPatchInfo);