mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-26 16:26:44 +03:00
Reduce JavaScript footprint
This commit is contained in:
parent
fea65b7ebf
commit
cc03546484
12 changed files with 811 additions and 942 deletions
9
dev/bootstrap.js
vendored
9
dev/bootstrap.js
vendored
|
|
@ -45,16 +45,11 @@ export default App => {
|
|||
*/
|
||||
setHash: (hash, silence = false, replace = false) => {
|
||||
hash = hash.replace(/^[#/]+/, '');
|
||||
|
||||
const cmd = replace ? 'replaceHash' : 'setHash';
|
||||
|
||||
hasher.active = !silence;
|
||||
hasher[replace ? 'replaceHash' : 'setHash'](hash);
|
||||
if (silence) {
|
||||
hasher.active = false;
|
||||
hasher[cmd](hash);
|
||||
hasher.active = true;
|
||||
} else {
|
||||
hasher.active = true;
|
||||
hasher[cmd](hash);
|
||||
hasher.setHash(hash);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue