MEGA provides robust cloud storage with convenient and powerful always-on privacy. MEGA believes in your right to privacy and provides you with the technology tools to protect it. We call it User Controlled Encryption (UCE), and it happens automatically.
secureboot.js
loads all the resources from static content servers
and verifies its authenticity by checking the cryptographic hash.
Note: This is not the exact same secureboot.js
as we have
online at https://mega.nz/``secureboot.js``. We have an automatic
process that generates secureboot.js
with its cryptographic
hashes and all the versioned resource files
(file_X.js
/file_X.html
) as needed based on this repository
before prior to updating the live site.
During development it's essential that your set the following
localStorage
parameters:
// Path of your local development host.
localStorage.staticpath = 'http://localhost/mega/';
// Disables the cryptographic hash verification logic.
localStorage.dd = 1;
There are also various other localStorage
parameters that are
useful during development:
// Enables vanilla console logging.
localStorage.d = 1;
// Enables full console logging via MegaLogger.
localStorage.minLogLevel = 0;
// Allows you to disable the context menu in the FM for element inspection.
localStorage.contextmenu = 1;
js/
-- contains all generic JavaScript fileshtml/
-- contains all generic HTML filesjs/html/
contains all JavaScript files that belong to the specific HTML file of the parent folderjs/vendor/
-- contains all JavaScript files from external developers
secureboot.js
-- loads all the resources from static content servers and verifies its authenticity by checking the cryptographic hashdecrypter.js
-- the decrypter which is used as a web worker to decrypt data while downloadingencrypter.js
-- the encrypter which is used as a web worker to encrypt data while uploadingjs/avatar.js
-- is used for avatar selection, cropping & scaling (all on the client side in the canvas)js/cleartemp.js
-- containsclearIt()
which is used to purge temp data from theFileSystem
API (Chrome only)js/countries.js
-- contains all the country names (we should translate these at some point)js/crypto.js
-- contains all the cryptographic functions & API handlersjs/download.js
-- contains all the download logicjs/filedrag.js
-- event handlers for the upload buttons, file&folder-drag&drop event handling for upload init.js/filetypes.js
-- contains all the supported file types based on the file extension to match iconsjs/fm.js
-- file manager core file, contains mainly file manager UI & dialog UI logicjs/functions.js
-- contains some generic functions that are used throughout the sitejs/keygen.js
-- for cryptographic public/private key pair creationjs/mDB.js
-- providers the local database abstraction layer for caching of meta-data inIndexedDB
js/mega.js
--MegaData
class which does most of the data handling (but also some FM UI interaction)js/megapix.js
-- client side canvas based thumbnail creation (because thumbnails are encrypted, too)js/mouse.js
-- captures mouse events for entropy collectionjs/notify.js
-- contains the notifications logicjs/thumbnail.js
-- client side canvas based thumbnail creation (because thumbnails are encrypted, too)js/upload.js
-- contains all the upload logicjs/account.js
-- contains the user creation & login logicjs/zip.js
-- JavaScript implementation to create ZIP archives of multiple files on the client side
asmcrypto.js
-- general-purpose cryptographic libraryjquery.jscrollpane.js
--jScrollpane
jQuery plugin for custom scrollbarsjs/checkboxes.js
-- jQuery iOS styled checkboxesjquery.mousewheel.js
-- jQuerymousewheel
plugin for cross browser mousewheel event handlingjquery-x.y.z.js
-- jQuery libraryjquery-ui-x.y.z.js
-- jQuery user interface for various UI functionality, such as: rubber-band selection, drag & dropzxcvbn.js
-- password strength verification library (including dictionary table)exif.js
-- library that we use to read the EXIF flags from images prior to client side thumbnail creation