Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpromer committed Aug 14, 2023
1 parent 6f7e56b commit 0f47950
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ global.sharedObj = {

protocol.registerSchemesAsPrivileged([
{
scheme: 'microblock',
scheme: 'newcoder',
privileges: {
standard: true,
supportFetchAPI: true,
Expand All @@ -24,11 +24,11 @@ protocol.registerSchemesAsPrivileged([
]);

function createWindow() {
const partition = 'persist:microblock';
const partition = 'persist:newcoder';
const ses = session.fromPartition(partition);

ses.protocol.registerFileProtocol('microblock', (request, callback) => {
const url = request.url.substr(13);
ses.protocol.registerFileProtocol('newcoder', (request, callback) => {
const url = request.url.substr(11);
callback({ path: path.normalize(`${__dirname}/new-coder-old-school/${url}`) })
});

Expand All @@ -41,10 +41,10 @@ function createWindow() {
nodeIntegration: true,
partition
},
icon: path.join(__dirname, "build/favicon.png")
icon: path.join(__dirname, "new-coder-old-school/icon.png")
})
// global.sharedObj.mainWin.loadFile("microBlock-IDE/index.html");
global.sharedObj.mainWin.loadURL("microblock://./index.html");
// global.sharedObj.mainWin.loadFile("newcoder-IDE/index.html");
global.sharedObj.mainWin.loadURL("newcoder://./index.html");
global.sharedObj.mainWin.maximize();

// Open the DevTools.
Expand Down
2 changes: 1 addition & 1 deletion new-coder-old-school

0 comments on commit 0f47950

Please sign in to comment.