Skip to content
This repository was archived by the owner on Mar 6, 2020. It is now read-only.

Commit 0ee12b5

Browse files
author
René Kooi
committed
Remove old upgrade code
1 parent ee82c7d commit 0ee12b5

1 file changed

Lines changed: 1 addition & 81 deletions

File tree

src/ExtPlug.js

Lines changed: 1 addition & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -334,87 +334,7 @@ const ExtPlug = Plugin.extend({
334334
* Upgrades old ExtPlug version settings.
335335
*/
336336
upgrade() {
337-
let stored = jsonParse(localStorage.getItem(LS_NAME));
338-
339-
// "hide-badges" was added in 0.10.0
340-
if (semvercmp(stored.version, '0.10.0') < 0) {
341-
stored.version = '0.10.0';
342-
const plugin = 'extplug/plugins/hide-badges/main';
343-
if (stored.installed.indexOf(plugin) === -1) {
344-
stored.installed.push(plugin);
345-
}
346-
}
347-
348-
// "rollover-blurbs" was removed from core in 0.12.0
349-
if (semvercmp(stored.version, '0.12.0') < 0) {
350-
stored.version = '0.12.0';
351-
replace(
352-
'extplug/plugins/rollover-blurbs/main',
353-
'https://extplug.github.io/rollover-blurb/build/rollover-blurb.js',
354-
'extplug/rollover-blurb/main'
355-
);
356-
}
357-
358-
if (semvercmp(stored.version, '0.13.0') < 0) {
359-
stored.version = '0.13.0';
360-
replace(
361-
'extplug/plugins/autowoot/main',
362-
'https://extplug.github.io/autowoot/build/autowoot.js',
363-
'extplug/autowoot/main'
364-
);
365-
replace(
366-
'extplug/plugins/chat-notifications/main',
367-
'https://extplug.github.io/chat-notifications/build/chat-notifications.js',
368-
'extplug/chat-notifications/main'
369-
);
370-
replace(
371-
'extplug/plugins/compact-history/main',
372-
'https://extplug.github.io/compact-history/build/compact-history.js',
373-
'extplug/compact-history/main'
374-
);
375-
replace(
376-
'extplug/plugins/hide-badges/main',
377-
'https://extplug.github.io/hide-badges/build/hide-badges.js',
378-
'extplug/hide-badges/main'
379-
);
380-
replace(
381-
'extplug/plugins/meh-icon/main',
382-
'https://extplug.github.io/meh-icons/build/meh-icons.js;' +
383-
'extplug/meh-icons/main'
384-
);
385-
replace(
386-
'extplug/plugins/room-styles/main',
387-
'https://extplug.github.io/room-styles/build/room-styles.js',
388-
'extplug/room-styles/main'
389-
);
390-
391-
// full-size video was removed in favour of plug's Video Only mode
392-
let fullSizeVideo = 'extplug/plugins/full-size-video/main';
393-
stored.installed = _.without(stored.installed, fullSizeVideo);
394-
delete stored.plugins[fullSizeVideo];
395-
}
396-
if (semvercmp(stored.version, '0.13.1') < 0) {
397-
stored.version = '0.13.1';
398-
// show-deleted was added to core in 0.13
399-
let showDeleted =
400-
'https://extplug.github.io/show-deleted/build/show-deleted.js;' +
401-
'extplug/show-deleted/main';
402-
if (stored.installed.indexOf(showDeleted) === -1) {
403-
stored.installed.push(showDeleted);
404-
}
405-
}
406-
407-
localStorage.setItem(LS_NAME, JSON.stringify(stored));
408-
409-
function replace(oldPlugin, url, name) {
410-
let i = stored.installed.indexOf(oldPlugin);
411-
if (i !== -1) {
412-
stored.installed.splice(i, 1, `${url};${name}`);
413-
// move settings
414-
stored.plugins[name] = stored.plugins[oldPlugin];
415-
delete stored.plugins[oldPlugin];
416-
}
417-
}
337+
// Empty
418338
}
419339
});
420340

0 commit comments

Comments
 (0)