Skip to content

Commit

Permalink
Removed unnecessary files
Browse files Browse the repository at this point in the history
  • Loading branch information
railsjack committed Jul 20, 2019
1 parent f6dce8d commit 2047686
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 634 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
files
node_modules
out
npm-debug.log
Expand Down
36 changes: 22 additions & 14 deletions player/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,33 @@ var TutorialList = function () {
};

var _load = function () {
_load_list();
_set_dir();

var dir = _get_dir();
};

var _load_list = function () {
var _set_dir = function () {
const cached_data_dir = localStorage.getItem('data_dir')
alert('localStorage data_dir: '+ cached_data_dir)

const app = require('electron').remote.app
var basepath = app.getAppPath();
const dialog = require('electron').remote.dialog
const data_dir = dialog.showOpenDialog(null, {
properties: ['openDirectory'],
defaultPath: basepath
})
if (data_dir){
localStorage.setItem('data_dir', data_dir)
if (!cached_data_dir) {
const app = require('electron').remote.app
var basepath = app.getAppPath();
const dialog = require('electron').remote.dialog
const data_dir = dialog.showOpenDialog(null, {
properties: ['openDirectory'],
defaultPath: basepath
})
if (data_dir) {
localStorage.setItem('data_dir', data_dir)
}
}
};

var _get_dir = function () {
const cached_data_dir = localStorage.getItem('data_dir')
return cached_data_dir;
};


var _load_html = function () {

var temp_vtt_file_dir = '';
Expand Down Expand Up @@ -95,7 +103,7 @@ var TutorialList = function () {


document.ready(function (event) {

tutorialList.addEventListener('change', function (e) {
Player.play(e.target.value)
});
Expand Down
Loading

0 comments on commit 2047686

Please sign in to comment.