Skip to content

Commit b0ed2df

Browse files
committed
more generic storage key
1 parent 47d2a90 commit b0ed2df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

resources/js/functions.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,9 @@ $(document).ready(function() {
424424
* On page load, selects the tab corresponding to stored Scala version.
425425
*/
426426
function setupScalaVersionTabs(scalaVersionTabs) {
427-
const BookStorage = Storage('org.scala-lang.docs.scala3.book');
427+
const DocsPreferences = Storage('org.scala-lang.docs.preferences');
428428
const Scala3 = 'scala-3';
429-
const scalaVersion = BookStorage.getPreference('scalaVersion', Scala3);
429+
const scalaVersion = DocsPreferences.getPreference('scalaVersion', Scala3);
430430

431431
function activateTab(tabs, scalaVersion) {
432432
// click the code tab corresponding to the preferred Scala version.
@@ -442,7 +442,7 @@ $(document).ready(function() {
442442
const parent = $(this).parent();
443443
const scalaVersion = $(this).data('target');
444444

445-
BookStorage.setPreference('scalaVersion', scalaVersion, oldValue => {
445+
DocsPreferences.setPreference('scalaVersion', scalaVersion, oldValue => {
446446
// when we set a new scalaVersion, find scalaVersionTabs except current one
447447
// and activate those tabs.
448448
activateTab(scalaVersionTabs.not(parent), scalaVersion);

0 commit comments

Comments
 (0)