const WindowManager = require('./WindowManager');
const windowManager = new WindowManager();
+const protocolStr = 'flast';
+
let loginCallback;
let mainWindow;
let subWindow;
}
registerProtocols = () => {
- protocol.registerFileProtocol('my', (request, callback) => {
+ protocol.registerFileProtocol(protocolStr, (request, callback) => {
const parsed = url.parse(request.url);
if (parsed.hostname.endsWith('.css') || parsed.hostname.endsWith('.js')) {
module.exports = class Application {
loadWindow = () => {
- app.setPath('userData', path.join(app.getPath('userData'), 'Stable'));
protocol.registerSchemesAsPrivileged([
- { scheme: 'my', privileges: { standard: true, bypassCSP: true, secure: true } }
+ { scheme: protocolStr, privileges: { standard: true, bypassCSP: true, secure: true } }
]);
app.on('ready', () => {
// registerProtocols();
-
+ session.defaultSession.setUserAgent(session.defaultSession.getUserAgent().replace(/ Electron\/[0-9\.]*/g, ''));
+
Menu.setApplicationMenu(null);
windowManager.addWindow();
const fs = require('fs');
const package = require(`${remote.app.getAppPath()}/package.json`);
+const protocolStr = 'flast';
const Config = require('electron-store');
const config = new Config();
*/
global.getConfigPath = () => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
return config.path;
}
global.getFiles = (pathName) => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
return listFiles(path.resolve(__dirname, pathName));
}
global.getFile = (path, json = false) => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
if (json) {
return require(path);
// ====================================================================== //
*/
-global.getAppName = (b) => {
- if (location.protocol != 'my:') return;
+global.getAppName = () => {
+ if (location.protocol != `${protocolStr}:`) return;
return package.name;
}
-global.getAppDescription = (b) => {
- if (location.protocol != 'my:') return;
+global.getAppDescription = () => {
+ if (location.protocol != `${protocolStr}:`) return;
return package.description;
}
-global.getAppVersion = (b) => {
- if (location.protocol != 'my:') return;
+global.getAppVersion = () => {
+ if (location.protocol != `${protocolStr}:`) return;
return package.version;
}
*/
global.clearBrowserData = (b) => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
b && ipcRenderer.send('clear-browsing-data', {});
}
*/
global.updateFilters = (b) => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
ipcRenderer.send('update-filters', {});
}
*/
global.getHistorys = () => new Promise((resolve) => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
ipcRenderer.send('data-history-get', {});
ipcRenderer.on('data-history-get', (e, args) => {
});
global.clearHistory = (b) => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
b && ipcRenderer.send('data-history-clear', {});
}
+global.getDownloads = () => new Promise((resolve) => {
+ if (location.protocol != `${protocolStr}:`) return;
+ ipcRenderer.send('data-downloads-get', {});
+
+ ipcRenderer.on('data-downloads-get', (e, args) => {
+ resolve(args.downloads);
+ });
+});
+
+global.clearDownloads = (b) => {
+ if (location.protocol != `${protocolStr}:`) return;
+
+ b && ipcRenderer.send('data-downloads-clear', {});
+}
+
global.getBookmarks = (isPrivate) => new Promise((resolve) => {
- if (location.protocol != 'my:') return;
- ipcRenderer.send('data-bookmark-get', { isPrivate });
+ if (location.protocol != `${protocolStr}:`) return;
+ ipcRenderer.send('data-bookmarks-get', { isPrivate });
- ipcRenderer.on('data-bookmark-get', (e, args) => {
+ ipcRenderer.on('data-bookmarks-get', (e, args) => {
resolve(args.bookmarks);
});
});
global.clearBookmark = (b) => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
- b && ipcRenderer.send('data-bookmark-clear', {});
+ b && ipcRenderer.send('data-bookmarks-clear', {});
}
/*
*/
global.getHomeButton = () => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
return config.get('design.homeButton');
}
global.setHomeButton = (b) => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
return config.set('design.homeButton', b);
}
global.getDarkTheme = () => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
return config.get('design.darkTheme');
}
global.setDarkTheme = (b) => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
return config.set('design.darkTheme', b);
}
global.getStartPage = () => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
return config.get('homePage.defaultPage');
}
global.setStartPage = (url) => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
return config.set('homePage.defaultPage', url);
}
global.getSearchEngines = () => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
return config.get('homePage.searchEngines');
}
global.getSearchEngine = () => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
for (var i = 0; i < config.get('homePage.searchEngines').length; i++) {
if (config.get('homePage.searchEngines')[i].name == config.get('homePage.defaultEngine')) {
}
global.setSearchEngine = (name) => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
getSearchEngines().some(function (item, i) {
if (item.name && item.name === name)
}
global.getAdBlocker = () => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
return config.get('adBlocker');
}
global.setAdBlocker = (b) => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
return config.set('adBlocker', b);
}
global.getCustomTitlebar = () => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
return config.get('window.isCustomTitlebar');
}
global.setCustomTitlebar = (b) => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
return config.set('window.isCustomTitlebar', b);
}
global.restart = () => {
- if (location.protocol != 'my:') return;
+ if (location.protocol != `${protocolStr}:`) return;
remote.app.relaunch();
remote.app.exit(0);
}
global.isURL = (input) => {
- const pattern = /^((?:\w+:)?\/\/([^\s.]+\.\S{2}|localhost[:?\d]*)|my:\/\/\S.*|file:\/\/\S.*)\S*$/;
+ const pattern = /^((?:\w+:)?\/\/([^\s.]+\.\S{2}|localhost[:?\d]*)|flast:\/\/\S.*|file:\/\/\S.*)\S*$/;
if (pattern.test(input)) {
return true;
onload = function () {
// console.log(document.documentElement.innerText);
- if (location.protocol == 'my:') return;
+ if (location.protocol == `${protocolStr}:`) return;
delete global.getConfigPath;
delete global.getFiles;
const { app, ipcMain, protocol, session, BrowserWindow, BrowserView, Menu, nativeImage, clipboard, dialog, Notification } = require('electron');
const path = require('path');
-const fs = require('fs');
-const url = require('url');
+const { parse, format } = require('url');
const os = require('os');
-const localShortcut = require("electron-localshortcut");
+const package = require(`${app.getAppPath()}/package.json`);
+const protocolStr = 'flast';
+
+const platform = require('electron-platform');
+const localShortcut = require('electron-localshortcut');
const Config = require('electron-store');
const config = new Config({
theme: 'default'
},
homePage: {
- defaultPage: 'my://home',
+ defaultPage: `${protocolStr}://home`,
defaultEngine: 'Google',
searchEngines: [
{
let db = {};
db.history = new Datastore({
- filename: path.join(app.getPath('userData'), 'Stable', 'Files', 'History.db'),
+ filename: path.join(app.getPath('userData'), 'Files', 'History.db'),
+ autoload: true,
+ timestampData: true
+});
+db.downloads = new Datastore({
+ filename: path.join(app.getPath('userData'), 'Files', 'Download.db'),
autoload: true,
timestampData: true
});
-db.bookmark = new Datastore({
- filename: path.join(app.getPath('userData'), 'Stable', 'Files', 'Bookmark.db'),
+db.bookmarks = new Datastore({
+ filename: path.join(app.getPath('userData'), 'Files', 'Bookmarks.db'),
autoload: true,
timestampData: true
});
getBaseWindow = (width = 1100, height = 680, minWidth = 320, minHeight = 200, x, y, frame = false) => {
return new BrowserWindow({
width, height, minWidth, minHeight, x, y, 'titleBarStyle': 'hidden', frame, fullscreenable: true,
+ icon: path.join(app.getAppPath(), 'static', 'app', 'icon.png'),
webPreferences: {
nodeIntegration: true,
webviewTag: true,
}
registerProtocols = () => {
- protocol.isProtocolHandled('my', (handled) => {
+ protocol.isProtocolHandled(protocolStr, (handled) => {
console.log(handled);
if (!handled) {
- protocol.registerFileProtocol('my', (request, callback) => {
- const parsed = url.parse(request.url);
+ protocol.registerFileProtocol(protocolStr, (request, callback) => {
+ const parsed = parse(request.url);
if (parsed.hostname.endsWith('.css') || parsed.hostname.endsWith('.js')) {
return callback({
}
registerProtocolWithPrivateMode = (windowId) => {
- session.fromPartition(windowId).protocol.registerFileProtocol('my', (request, callback) => {
- const parsed = url.parse(request.url);
+ const ses = session.fromPartition(windowId);
+ ses.setUserAgent(ses.getUserAgent().replace(/ Electron\/[0-9\.]*/g, '') + ' PrivMode');
+ ses.protocol.registerFileProtocol(protocolStr, (request, callback) => {
+ const parsed = parse(request.url);
if (parsed.hostname.endsWith('.css') || parsed.hostname.endsWith('.js')) {
return callback({
db.history.remove({}, { multi: true });
});
- ipcMain.on('data-bookmark-get', (e, args) => {
- db.bookmark.find({ isPrivate: args.isPrivate }).sort({ createdAt: -1 }).exec((err, docs) => {
- e.sender.send('data-bookmark-get', { bookmarks: docs });
+ ipcMain.on('data-downloads-get', (e, args) => {
+ db.downloads.find({}).sort({ createdAt: -1 }).exec((err, docs) => {
+ e.sender.send('data-downloads-get', { downloads: docs });
+ });
+ });
+
+ ipcMain.on('data-downloads-clear', (e, args) => {
+ db.downloads.remove({}, { multi: true });
+ });
+
+ ipcMain.on('data-bookmarks-get', (e, args) => {
+ db.bookmarks.find({ isPrivate: args.isPrivate }).sort({ createdAt: -1 }).exec((err, docs) => {
+ e.sender.send('data-bookmarks-get', { bookmarks: docs });
});
});
- ipcMain.on('data-bookmark-clear', (e, args) => {
- db.bookmark.remove({}, { multi: true });
+ ipcMain.on('data-bookmarks-clear', (e, args) => {
+ db.bookmarks.remove({}, { multi: true });
});
ipcMain.on('clear-browsing-data', () => {
config.clear();
db.history.remove({}, { multi: true });
- db.bookmark.remove({}, { multi: true });
+ db.bookmarks.remove({}, { multi: true });
});
}
config.get('window.isMaximized') && window.maximize();
- const startUrl = process.env.ELECTRON_START_URL || url.format({
+ const startUrl = process.env.ELECTRON_START_URL || format({
pathname: path.join(__dirname, '/../build/index.html'), // 警告:このファイルを移動する場合ここの相対パスの指定に注意してください
protocol: 'file:',
slashes: true,
for (var i = 0; i < views.length; i++) {
if (views[i].windowId == id) {
const url = views[i].view.webContents.getURL();
- datas.push({ id: views[i].id, title: views[i].view.webContents.getTitle(), url: url, icon: url.startsWith('my://') ? undefined : `http://www.google.com/s2/favicons?domain=${url}` });
+ const parsed = parse(url);
+ datas.push({ id: views[i].id, title: views[i].view.webContents.getTitle(), url: url, icon: url.startsWith(`${protocolStr}://`) ? undefined : `https://www.google.com/s2/favicons?domain=${parsed.protocol}//${parsed.hostname}` });
}
}
e.sender.send(`browserview-get-${id}`, { views: datas });
views.filter((view, i) => {
if (view.id == args.id) {
let v = views[i].view;
- db.bookmark.insert({ title: v.webContents.getTitle(), url: v.webContents.getURL(), isPrivate: args.isPrivate });
+ db.bookmarks.insert({ title: v.webContents.getTitle(), url: v.webContents.getURL(), isPrivate: args.isPrivate });
this.updateBookmarkState(id, args.id, v);
}
});
views.filter((view, i) => {
if (view.id == args.id) {
let v = views[i].view;
- db.bookmark.remove({ url: v.webContents.getURL(), isPrivate: args.isPrivate }, {});
+ db.bookmarks.remove({ url: v.webContents.getURL(), isPrivate: args.isPrivate }, {});
this.updateBookmarkState(id, args.id, v);
}
});
views.filter((view, i) => {
if (view.id == args.id) {
let v = views[i].view;
- db.bookmark.find({ url: v.webContents.getURL(), isPrivate: args.isPrivate }, (err, docs) => {
+ db.bookmarks.find({ url: v.webContents.getURL(), isPrivate: args.isPrivate }, (err, docs) => {
e.sender.send(`data-bookmark-has-${id}`, { isBookmarked: (docs.length > 0 ? true : false) });
});
}
updateBookmarkState = (windowId, id, view) => {
const window = this.windows.get(windowId);
- db.bookmark.find({ url: view.webContents.getURL(), isPrivate: (String(windowId).startsWith('private')) }, (err, docs) => {
- window.webContents.send(`browserview-load-${windowId}`, { id: id, title: view.webContents.getTitle(), url: view.webContents.getURL(), isBookmarked: (docs.length > 0 ? true : false) });
+ db.bookmarks.find({ url: view.webContents.getURL(), isPrivate: (String(windowId).startsWith('private')) }, (err, docs) => {
+ const url = view.webContents.getURL();
+ const parsed = parse(url);
+ window.webContents.send(`browserview-load-${windowId}`, { id: id, title: view.webContents.getTitle(), url: url, icon: url.startsWith(`${protocolStr}://`) ? undefined : `https://www.google.com/s2/favicons?domain=${parsed.protocol}//${parsed.hostname}`, isBookmarked: (docs.length > 0 ? true : false) });
});
}
}
addView = (windowId, url, isActive) => {
+ if (String(windowId).startsWith('private')) {
+ registerProtocolWithPrivateMode(windowId);
+ }
+
const id = tabCount++;
this.addTab(windowId, id, url, isActive);
}
removeView = (windowId, id) => {
views.filter((view, i) => {
if (windowId == view.windowId && id == view.id) {
+ views[i].view.destroy();
views.splice(i, 1);
}
});
for (var i = 0; i < views.length; i++) {
if (views[i].windowId == windowId) {
const url = views[i].view.webContents.getURL();
- datas.push({ id: views[i].id, title: views[i].view.webContents.getTitle(), url: url, icon: url.startsWith('my://') ? undefined : `http://www.google.com/s2/favicons?domain=${url}` });
+ const parsed = parse(url);
+ datas.push({ id: views[i].id, title: views[i].view.webContents.getTitle(), url: url, icon: url.startsWith(`${protocolStr}://`) ? undefined : `https://www.google.com/s2/favicons?domain=${parsed.protocol}//${parsed.hostname}` });
}
}
const window = this.windows.get(windowId);
}
});
- const defaultUserAgent = view.webContents.getUserAgent();
-
- if (String(windowId).startsWith('private')) {
- registerProtocolWithPrivateMode(windowId);
- }
-
view.webContents.on('did-start-loading', () => {
if (view.isDestroyed()) return;
view.webContents.on('did-finish-load', (e) => {
if (view.isDestroyed()) return;
- if (String(windowId).startsWith('private') && view.webContents.getURL().startsWith('my://'))
- view.webContents.setUserAgent(defaultUserAgent + ' PrivMode');
-
- window.setTitle(view.webContents.getTitle());
+ window.setTitle(`${view.webContents.getTitle()} - ${process.env.npm_package_name}`);
this.updateBookmarkState(windowId, id, view);
this.updateNavigationState(windowId, id, view);
view.webContents.on('page-title-updated', (e) => {
if (view.isDestroyed()) return;
- window.setTitle(view.webContents.getTitle());
+ window.setTitle(`${view.webContents.getTitle()} - ${process.env.npm_package_name}`);
this.updateBookmarkState(windowId, id, view);
- if (!String(windowId).startsWith('private') && !view.webContents.getURL().startsWith('my://'))
+ if (!String(windowId).startsWith('private') && !view.webContents.getURL().startsWith(`${protocolStr}://`))
db.history.insert({ title: view.webContents.getTitle(), url: view.webContents.getURL() });
this.updateNavigationState(windowId, id, view);
view.webContents.on('page-favicon-updated', (e, favicons) => {
if (view.isDestroyed()) return;
- window.setTitle(view.webContents.getTitle());
- db.bookmark.find({ url: view.webContents.getURL(), isPrivate: (String(windowId).startsWith('private')) }, (err, docs) => {
- window.webContents.send(`browserview-load-${windowId}`, { id: id, title: view.webContents.getTitle(), url: view.webContents.getURL(), favicon: favicons[0], isBookmarked: (docs.length > 0 ? true : false) });
+ window.setTitle(`${view.webContents.getTitle()} - ${process.env.npm_package_name}`);
+ db.bookmarks.find({ url: view.webContents.getURL(), isPrivate: (String(windowId).startsWith('private')) }, (err, docs) => {
+ const url = view.webContents.getURL();
+ window.webContents.send(`browserview-load-${windowId}`, { id: id, title: view.webContents.getTitle(), url: url, icon: url.startsWith(`${protocolStr}://`) ? undefined : favicons[0], isBookmarked: (docs.length > 0 ? true : false) });
});
this.updateNavigationState(windowId, id, view);
view.webContents.on('did-change-theme-color', (e, color) => {
if (view.isDestroyed()) return;
- window.setTitle(view.webContents.getTitle());
- db.bookmark.find({ url: view.webContents.getURL(), isPrivate: (String(windowId).startsWith('private')) }, (err, docs) => {
+ window.setTitle(`${view.webContents.getTitle()} - ${process.env.npm_package_name}`);
+ db.bookmarks.find({ url: view.webContents.getURL(), isPrivate: (String(windowId).startsWith('private')) }, (err, docs) => {
window.webContents.send(`browserview-load-${windowId}`, { id: id, title: view.webContents.getTitle(), url: view.webContents.getURL(), color: color, isBookmarked: (docs.length > 0 ? true : false) });
});
});
{
label: 'ページの保存',
accelerator: 'CmdOrCtrl+S',
- enabled: !view.webContents.getURL().startsWith('my://'),
+ enabled: !view.webContents.getURL().startsWith(`${protocolStr}://`),
click: () => {
view.webContents.savePage(`${app.getPath('downloads')}/${view.webContents.getTitle()}.html`, 'HTMLComplete', (err) => {
if (!err) console.log('Page Save successfully');
label: '印刷',
accelerator: 'CmdOrCtrl+P',
icon: `${app.getAppPath()}/static/print.png`,
- enabled: !view.webContents.getURL().startsWith('my://'),
+ enabled: !view.webContents.getURL().startsWith(`${protocolStr}://`),
click: () => { view.webContents.print(); }
},
{ type: 'separator' },
{
label: 'デベロッパーツール',
accelerator: 'CmdOrCtrl+Shift+I',
- enabled: !view.webContents.getURL().startsWith('my://'),
+ enabled: !view.webContents.getURL().startsWith(`${protocolStr}://`),
click: () => { if (view.webContents.isDevToolsOpened()) { view.webContents.devToolsWebContents.focus(); } else { view.webContents.openDevTools(); } }
}
]
});
view.webContents.session.on('will-download', (event, item, webContents) => {
+ let document = { name: item.getFilename(), url: item.getURL(), type: item.getMimeType(), size: item.getTotalBytes(), path: item.getSavePath(), status: item.getState() };
+ db.downloads.insert(document);
item.on('updated', (e, state) => {
- if (state === 'interrupted') {
- console.log('Download is interrupted but can be resumed')
- } else if (state === 'progressing') {
- if (item.isPaused()) {
- console.log('Download is paused')
- } else {
- console.log(`Received bytes: ${item.getReceivedBytes()}`)
- }
- }
+ db.downloads.update(document, { name: item.getFilename(), url: item.getURL(), type: item.getMimeType(), size: item.getTotalBytes(), path: item.getSavePath(), status: state });
});
item.once('done', (e, state) => {
- if (state === 'completed') {
- console.log('Download successfully')
- } else {
- console.log(`Download failed: ${state}`)
- }
+ db.downloads.update(document, { name: item.getFilename(), url: item.getURL(), type: item.getMimeType(), size: item.getTotalBytes(), path: item.getSavePath(), status: state });
});
});
{
- "name": "MyBrowser",
+ "name": "Flast",
"description": "Cross-platform browser based on Chromium.",
- "version": "1.5.2",
+ "version": "1.5.6",
"private": true,
"main": "electron/Starter.js",
"homepage": "./",
"@cliqz/adblocker": "0.8.0",
"axios": "0.18.0",
"electron-localshortcut": "^3.1.0",
- "electron-packager": "^13.1.1",
+ "electron-packager": "13.1.1",
"electron-platform": "^1.2.0",
- "electron-store": "^3.2.0",
+ "electron-store": "3.2.0",
"nedb": "^1.8.0",
- "react": "^16.8.6",
- "react-dom": "^16.8.6",
- "react-router": "^5.0.0",
- "react-router-dom": "^5.0.0",
+ "react": "16.8.6",
+ "react-dom": "16.8.6",
+ "react-router": "5.0.0",
+ "react-router-dom": "5.0.0",
"react-scripts": "3.0.0",
- "react-tooltip": "^3.10.0",
+ "react-tooltip": "3.10.0",
"styled-components": "^4.2.0",
"tldts": "^4.0.6",
"username": "^5.0.0"
},
"devDependencies": {
- "electron": "^5.0.1",
- "electron-builder": "^20.40.2",
- "electron-packager": "^13.1.1",
+ "electron": "5.0.1",
+ "electron-packager": "13.1.1",
"log-update": "3.2.0",
"npm-run-all": "^4.1.5",
- "react": "^16.8.6",
- "react-dom": "^16.8.6",
- "react-router": "^5.0.0",
- "react-router-dom": "^5.0.0",
- "react-scripts": "3.0.0",
- "typescript": "^3.4.5"
+ "react": "16.8.6",
+ "react-dom": "16.8.6",
+ "react-router": "5.0.0",
+ "react-router-dom": "5.0.0",
+ "react-scripts": "3.0.0"
},
"eslintConfig": {
"extends": "react-app"
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
- <link rel="icon" sizes="any" href="my://public.svg" type="image/svg+xml">
- <link rel="mask-icon" href="my://public.svg" color="black">
+ <link rel="icon" sizes="any" href="flast://public.svg" type="image/svg+xml">
+ <link rel="mask-icon" href="flast://public.svg" color="black">
</head>
<body>
HTMl
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>ブックマーク</title>
- <link href="my://style.css" type="text/css" rel="stylesheet" />
+ <link href="flast://style.css" type="text/css" rel="stylesheet" />
<script>
if (getDarkTheme()) {
document.write(
}
</script>
<link href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.min.css" type="text/css" rel="stylesheet" />
- <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" type="text/css" rel="stylesheet" />
+ <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" type="text/css"
+ rel="stylesheet" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" type="text/css" rel="stylesheet" />
- <link rel="icon" sizes="any" href="my://public.svg" type="image/svg+xml">
- <link rel="mask-icon" href="my://public.svg" color="black">
+ <link rel="icon" sizes="any" href="flast://public.svg" type="image/svg+xml">
+ <link rel="mask-icon" href="flast://public.svg" color="black">
</head>
<body style="padding-top: 75px;">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
- <a class="navbar-brand"><script>document.write(getAppName());</script></a>
+ <a class="navbar-brand">
+ <script>document.write(getAppName());</script></a>
<ul class="nav navbar-nav navbar-right">
<li><a href="#" data-toggle="modal" data-target="#clearModal">ブックマークをクリア</a></li>
</ul>
<div class="col-md-3">
<ul class="nav nav-pills nav-stacked">
<li>
- <a href="my://home/">
+ <a href="flast://home/">
<i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">home</i>
ホーム
</a>
</li>
<hr>
<li>
- <a href="my://history/">
+ <a href="flast://history/">
<i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">history</i>
履歴
</a>
</li>
<li>
- <a href="my://downloads/">
+ <a href="flast://downloads/">
<i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">get_app</i>
ダウンロード
</a>
</li>
<li>
- <a href="my://bookmarks/">
+ <a href="flast://bookmarks/">
<i class="material-icons"
style="vertical-align: text-bottom; font-size: 16px;">bookmarks</i> ブックマーク
</a>
</li>
<li>
- <a href="my://store/">
+ <a href="flast://store/">
<i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">shop</i>
WebApp Store
</a>
設定
</a>
<ul class="dropdown-menu" style="width: 100%;">
- <li><a href="my://settings/">ホーム</a></li>
+ <li><a href="flast://settings/">ホーム</a></li>
<li class="divider"></li>
- <li><a href="my://settings/#design">デザイン</a></li>
- <li><a href="my://settings/#engine">検索エンジン</a></li>
- <li><a href="my://settings/#adblock">広告ブロック</a></li>
- <li><a href="my://settings/#window">ウィンドウ</a></li>
+ <li><a href="flast://settings/#design">デザイン</a></li>
+ <li><a href="flast://settings/#engine">検索エンジン</a></li>
+ <li><a href="flast://settings/#adblock">広告ブロック</a></li>
+ <li><a href="flast://settings/#window">ウィンドウ</a></li>
<li class="divider"></li>
- <li><a href="my://settings/#about"><script>document.write(getAppName());</script> について</a></li>
+ <li><a href="flast://settings/#about">
+ <script>document.write(getAppName());</script> について</a></li>
</ul>
</li>
<li>
- <a href="my://help/">
+ <a href="flast://help/">
<i class="material-icons"
style="vertical-align: text-bottom; font-size: 16px;">help_outline</i> ヘルプ
</a>
<table class="table table-striped table-hover table-style" id="privMarkList">
<thead>
<tr>
+ <th class="table-icon"></th>
<th class="table-title">タイトル</th>
<th class="table-url">URL</th>
- <th style="width: 200px; white-space: nowrap;">追加日時</th>
+ <th class="table-date">追加日時</th>
</tr>
</thead>
<tbody>
<table class="table table-striped table-hover table-style" id="markList">
<thead>
<tr>
+ <th class="table-icon"></th>
<th class="table-title">タイトル</th>
<th class="table-url">URL</th>
- <th style="width: 200px; white-space: nowrap;">追加日時</th>
+ <th class="table-date">追加日時</th>
</tr>
</thead>
<tbody>
<h4 class="modal-title">ブックマークをクリア</h4>
</div>
<div class="modal-body">
- これまでのブックマークをクリアします。
+ これまでのブックマークをクリアします。<br>
続行を押すとブックマークがクリアされます。
</div>
<div class="modal-footer">
if (navigator.userAgent.indexOf('PrivMode') != -1) {
getBookmarks(true).then((data) => {
data.forEach((item, i) => {
- $('#privMarkList').append($('<tr></tr>').append($('<td class="table-title"></td>').append($(`<a href="${item.url}"></a>`).text(item.title))).append($('<td class="table-url"></td>').text(item.url)).append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm'))));
+ $('#markList').append(
+ $('<tr></tr>')
+ .append($('<td class="table-icon"></td>').append($(`<img src="http://www.google.com/s2/favicons?domain=${new URL(item.url).origin}" />`)))
+ .append($('<td class="table-title"></td>').append($(`<a href="${item.url}"></a>`).text(item.title)))
+ .append($('<td class="table-url"></td>').text(item.url))
+ .append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm')))
+ );
});
getBookmarks(false).then((data) => {
data.forEach((item, i) => {
- $('#markList').append($('<tr></tr>').append($('<td class="table-title"></td>').append($(`<a href="${item.url}"></a>`).text(item.title))).append($('<td class="table-url"></td>').text(item.url)).append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm'))));
+ $('#markList').append(
+ $('<tr></tr>')
+ .append($('<td class="table-icon"></td>').append($(`<img src="http://www.google.com/s2/favicons?domain=${new URL(item.url).origin}" />`)))
+ .append($('<td class="table-title"></td>').append($(`<a href="${item.url}"></a>`).text(item.title)))
+ .append($('<td class="table-url"></td>').text(item.url))
+ .append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm')))
+ );
});
});
});
} else {
getBookmarks(false).then((data) => {
data.forEach((item, i) => {
- $('#markList').append($('<tr></tr>').append($('<td class="table-title"></td>').append($(`<a href="${item.url}"></a>`).text(item.title))).append($('<td class="table-url"></td>').text(item.url)).append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm'))));
+ $('#markList').append(
+ $('<tr></tr>')
+ .append($('<td class="table-icon"></td>').append($(`<img src="http://www.google.com/s2/favicons?domain=${new URL(item.url).origin}" />`)))
+ .append($('<td class="table-title"></td>').append($(`<a href="${item.url}"></a>`).text(item.title)))
+ .append($('<td class="table-url"></td>').text(item.url))
+ .append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm')))
+ );
});
});
}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>Credits | MyBrowser</title>
- <link href="my://style.css" rel="stylesheet">
- <link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/paper/bootstrap.min.css" rel="stylesheet"
- integrity="sha384-czdUt3c5InCk6AjJWW7zMMS5xcvRAyC6tWoWfXuRYfX6Vvv4Es8m8eRjzMChD493" crossorigin="anonymous">
- <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" rel="stylesheet">
- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
- <link rel="icon" sizes="any" href="my://public.svg" type="image/svg+xml">
- <link rel="mask-icon" href="my://public.svg" color="black">
+ <title>Credits</title>
+ <link href="flast://style.css" type="text/css" rel="stylesheet" />
+ <script>
+ if (getDarkTheme()) {
+ document.write(
+ `<link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/darkly/bootstrap.min.css" type="text/css" rel="stylesheet" integrity="sha384-pKJMCXwCXq3HwRBt27cwwSmc0/DAo2BjRxGd7nEESEStk++p6LffHmhX9oqzVDUk" crossorigin="anonymous" />`
+ );
+ } else {
+ document.write(
+ `<link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/flatly/bootstrap.min.css" type="text/css" rel="stylesheet" integrity="sha384-bfWZLPtvQKHg/nZNhaO/ZW4Ba8ISud5CtEjnCTU6OR1yOq5zrrF+JP2o7om6rzLf" crossorigin="anonymous" />`
+ );
+ }
+ </script>
+ <link href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.min.css" type="text/css" rel="stylesheet" />
+ <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" type="text/css" rel="stylesheet" />
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" type="text/css" rel="stylesheet" />
+ <link rel="icon" sizes="any" href="flast://public.svg" type="image/svg+xml">
+ <link rel="mask-icon" href="flast://public.svg" color="black">
</head>
-<body>
- <header class="topbar">
- <div class="nav-toggle">
- <i class="material-icons">
- menu
- </i>
+<body style="padding-top: 75px;">
+ <nav class="navbar navbar-default navbar-fixed-top">
+ <div class="container-fluid">
+ <div class="navbar-header">
+ <a class="navbar-brand"><script>document.write(getAppName());</script></a>
+ </div>
</div>
- <h5 class="title">Credits</h5>
- </header>
- <div class="nav">
- </div>
- <div class="container">
- <div class="panel panel-default" id="about">
- <div class="panel-heading">Credits</div>
- <div class="panel-body">
- <div class="container-fluid">
- <div class="row">
- <div class="col-md-12">
- <ul>
- <li>Chromium</li>
- <li>Electron</li>
- <li>electron-store</li>
- <li>electron-platform</li>
- <li>React</li>
- <li>Styled-Components</li>
- </ul>
- </div>
- </div>
+ </nav>
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-3">
+ <ul class="nav nav-pills nav-stacked">
+ <li>
+ <a href="flast://home/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">home</i>
+ ホーム
+ </a>
+ </li>
+ <hr>
+ <li>
+ <a href="flast://history/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">history</i>
+ 履歴
+ </a>
+ </li>
+ <li>
+ <a href="flast://downloads/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">get_app</i>
+ ダウンロード
+ </a>
+ </li>
+ <li>
+ <a href="flast://bookmarks/">
+ <i class="material-icons"
+ style="vertical-align: text-bottom; font-size: 16px;">bookmarks</i> ブックマーク
+ </a>
+ </li>
+ <li>
+ <a href="flast://store/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">shop</i>
+ WebApp Store
+ </a>
+ </li>
+ <li class="dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">settings</i>
+ 設定
+ </a>
+ <ul class="dropdown-menu" style="width: 100%;">
+ <li><a href="flast://settings/">ホーム</a></li>
+ <li class="divider"></li>
+ <li><a href="flast://settings/#design">デザイン</a></li>
+ <li><a href="flast://settings/#engine">検索エンジン</a></li>
+ <li><a href="flast://settings/#adblock">広告ブロック</a></li>
+ <li><a href="flast://settings/#window">ウィンドウ</a></li>
+ <li class="divider"></li>
+ <li><a href="flast://settings/#about"><script>document.write(getAppName());</script> について</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="flast://help/">
+ <i class="material-icons"
+ style="vertical-align: text-bottom; font-size: 16px;">help_outline</i> ヘルプ
+ </a>
+ </li>
+ </ul>
+ </div>
+ <div class="col-md-9" style="padding-right: 0px;">
+ <div style="padding: 15px; overflow-y: auto; height: calc(100vh - 75px);">
+ <h3>Credits</h3>
+ <hr>
+ <ul>
+ <li>Chromium</li>
+ <li>Electron</li>
+ <li>electron-store</li>
+ <li>electron-platform</li>
+ <li>React</li>
+ <li>Styled-Components</li>
+ </ul>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/locale/ja.js"></script>
<script type="text/javascript">
$(document).ready(function () {
- $('.nav a[href="' + window.location.pathname + '"]').parent().addClass('active');
+ $(`a[href="${window.location.href}"]`).parent().addClass('active');
});
</script>
</body>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>デバッグ | MyBrowser</title>
- <link href="my://style.css" rel="stylesheet">
- <link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/paper/bootstrap.min.css" rel="stylesheet"
- integrity="sha384-czdUt3c5InCk6AjJWW7zMMS5xcvRAyC6tWoWfXuRYfX6Vvv4Es8m8eRjzMChD493" crossorigin="anonymous">
- <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" rel="stylesheet">
- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
- <link rel="icon" sizes="any" href="my://public.svg" type="image/svg+xml">
- <link rel="mask-icon" href="my://public.svg" color="black">
+ <title>Debug</title>
+ <link href="flast://style.css" type="text/css" rel="stylesheet" />
+ <script>
+ if (getDarkTheme()) {
+ document.write(
+ `<link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/darkly/bootstrap.min.css" type="text/css" rel="stylesheet" integrity="sha384-pKJMCXwCXq3HwRBt27cwwSmc0/DAo2BjRxGd7nEESEStk++p6LffHmhX9oqzVDUk" crossorigin="anonymous" />`
+ );
+ } else {
+ document.write(
+ `<link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/flatly/bootstrap.min.css" type="text/css" rel="stylesheet" integrity="sha384-bfWZLPtvQKHg/nZNhaO/ZW4Ba8ISud5CtEjnCTU6OR1yOq5zrrF+JP2o7om6rzLf" crossorigin="anonymous" />`
+ );
+ }
+ </script>
+ <link href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.min.css" type="text/css" rel="stylesheet" />
+ <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" type="text/css" rel="stylesheet" />
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" type="text/css" rel="stylesheet" />
+ <link rel="icon" sizes="any" href="flast://public.svg" type="image/svg+xml">
+ <link rel="mask-icon" href="flast://public.svg" color="black">
</head>
-<body>
- <header class="topbar">
- <div class="nav-toggle">
- <i class="material-icons">
- menu
- </i>
+<body style="padding-top: 75px;">
+ <nav class="navbar navbar-default navbar-fixed-top">
+ <div class="container-fluid">
+ <div class="navbar-header">
+ <a class="navbar-brand"><script>document.write(getAppName());</script></a>
+ </div>
+ </div>
+ </nav>
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-3">
+ <ul class="nav nav-pills nav-stacked">
+ <li>
+ <a href="flast://home/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">home</i>
+ ホーム
+ </a>
+ </li>
+ <hr>
+ <li>
+ <a href="flast://history/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">history</i>
+ 履歴
+ </a>
+ </li>
+ <li>
+ <a href="flast://downloads/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">get_app</i>
+ ダウンロード
+ </a>
+ </li>
+ <li>
+ <a href="flast://bookmarks/">
+ <i class="material-icons"
+ style="vertical-align: text-bottom; font-size: 16px;">bookmarks</i> ブックマーク
+ </a>
+ </li>
+ <li>
+ <a href="flast://store/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">shop</i>
+ WebApp Store
+ </a>
+ </li>
+ <li class="dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">settings</i>
+ 設定
+ </a>
+ <ul class="dropdown-menu" style="width: 100%;">
+ <li><a href="flast://settings/">ホーム</a></li>
+ <li class="divider"></li>
+ <li><a href="flast://settings/#design">デザイン</a></li>
+ <li><a href="flast://settings/#engine">検索エンジン</a></li>
+ <li><a href="flast://settings/#adblock">広告ブロック</a></li>
+ <li><a href="flast://settings/#window">ウィンドウ</a></li>
+ <li class="divider"></li>
+ <li><a href="flast://settings/#about"><script>document.write(getAppName());</script> について</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="flast://help/">
+ <i class="material-icons"
+ style="vertical-align: text-bottom; font-size: 16px;">help_outline</i> ヘルプ
+ </a>
+ </li>
+ </ul>
+ </div>
+ <div class="col-md-9" style="padding-right: 0px;">
+ <div style="padding: 15px; overflow-y: auto; height: calc(100vh - 75px);">
+ <h3>Debug</h3>
+ <hr>
+ <div class="panel panel-default" id="about">
+ <div class="panel-heading">Credits</div>
+ <div class="panel-body">
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-12">
+ <ul>
+ <li>Chromium</li>
+ <li>Electron</li>
+ <li>electron-store</li>
+ <li>electron-platform</li>
+ <li>React</li>
+ <li>Styled-Components</li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
- <h5 class="title">デバッグ</h5>
- </header>
- <div class="nav">
- </div>
- <div class="container">
- <h1>🐬の人: おれんじ</h1>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/locale/ja.js"></script>
<script type="text/javascript">
$(document).ready(function () {
- $('.nav a[href="' + window.location.pathname + '"]').parent().addClass('active');
+ $(`a[href="${window.location.href}"]`).parent().addClass('active');
});
</script>
</body>
--- /dev/null
+<!DOCTYPE html>
+<html lang="ja">
+
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <title>ダウンロード</title>
+ <link href="flast://style.css" type="text/css" rel="stylesheet" />
+ <script>
+ if (getDarkTheme()) {
+ document.write(
+ `<link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/darkly/bootstrap.min.css" type="text/css" rel="stylesheet" integrity="sha384-pKJMCXwCXq3HwRBt27cwwSmc0/DAo2BjRxGd7nEESEStk++p6LffHmhX9oqzVDUk" crossorigin="anonymous" />`
+ );
+ } else {
+ document.write(
+ `<link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/flatly/bootstrap.min.css" type="text/css" rel="stylesheet" integrity="sha384-bfWZLPtvQKHg/nZNhaO/ZW4Ba8ISud5CtEjnCTU6OR1yOq5zrrF+JP2o7om6rzLf" crossorigin="anonymous" />`
+ );
+ }
+ </script>
+ <link href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.min.css" type="text/css" rel="stylesheet" />
+ <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" type="text/css"
+ rel="stylesheet" />
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" type="text/css" rel="stylesheet" />
+ <link rel="icon" sizes="any" href="flast://public.svg" type="image/svg+xml">
+ <link rel="mask-icon" href="flast://public.svg" color="black">
+</head>
+
+<body style="padding-top: 75px;">
+ <nav class="navbar navbar-default navbar-fixed-top">
+ <div class="container-fluid">
+ <div class="navbar-header">
+ <a class="navbar-brand">
+ <script>document.write(getAppName());</script></a>
+ <ul class="nav navbar-nav navbar-right">
+ <li><a href="#" data-toggle="modal" data-target="#clearModal">履歴をクリア</a></li>
+ </ul>
+ </div>
+ </div>
+ </nav>
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-3">
+ <ul class="nav nav-pills nav-stacked">
+ <li>
+ <a href="flast://home/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">home</i>
+ ホーム
+ </a>
+ </li>
+ <hr>
+ <li>
+ <a href="flast://history/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">history</i>
+ 履歴
+ </a>
+ </li>
+ <li>
+ <a href="flast://downloads/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">get_app</i>
+ ダウンロード
+ </a>
+ </li>
+ <li>
+ <a href="flast://bookmarks/">
+ <i class="material-icons"
+ style="vertical-align: text-bottom; font-size: 16px;">bookmarks</i> ブックマーク
+ </a>
+ </li>
+ <li>
+ <a href="flast://store/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">shop</i>
+ WebApp Store
+ </a>
+ </li>
+ <li class="dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">settings</i>
+ 設定
+ </a>
+ <ul class="dropdown-menu" style="width: 100%;">
+ <li><a href="flast://settings/">ホーム</a></li>
+ <li class="divider"></li>
+ <li><a href="flast://settings/#design">デザイン</a></li>
+ <li><a href="flast://settings/#engine">検索エンジン</a></li>
+ <li><a href="flast://settings/#adblock">広告ブロック</a></li>
+ <li><a href="flast://settings/#window">ウィンドウ</a></li>
+ <li class="divider"></li>
+ <li><a href="flast://settings/#about">
+ <script>document.write(getAppName());</script> について</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="flast://help/">
+ <i class="material-icons"
+ style="vertical-align: text-bottom; font-size: 16px;">help_outline</i> ヘルプ
+ </a>
+ </li>
+ </ul>
+ </div>
+ <div class="col-md-9" style="padding-right: 0px;">
+ <div style="padding: 15px; overflow-y: auto; height: calc(100vh - 75px);">
+ <h3>ダウンロード</h3>
+ <hr>
+ <div class="table-responsive">
+ <table class="table table-striped table-hover table-style" id="downloadsList">
+ <thead>
+ <tr>
+ <th class="table-title" style="width: 200px;">タイトル</th>
+ <th class="table-url" style="width: calc(100% - 450px);">URL</th>
+ <th style="width: 100px; white-space: nowrap;">情報</th>
+ <th style="width: 150px; white-space: nowrap;">開始日時</th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="modal fade" id="clearModal" tabindex="-1">
+ <div class="modal-dialog" style="z-index: 9999;">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal"><span>×</span></button>
+ <h4 class="modal-title">ダウンロード履歴をクリア</h4>
+ </div>
+ <div class="modal-body">
+ これまでのダウンロード履歴をクリアします。<br>
+ 続行を押すとダウンロード履歴がクリアされます。
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-link" data-dismiss="modal">閉じる</button>
+ <button type="button" class="btn btn-primary" id="clearDownloads">続行</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/locale/ja.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function () {
+ $(`a[href="${window.location.href}"]`).parent().addClass('active');
+
+ $('#clearDownloads').click(function () {
+ clearDownloads(true);
+ location.reload();
+ });
+
+ getDownloads().then((data) => {
+ data.forEach((item, i) => {
+ $('#downloadsList').append(
+ $('<tr></tr>')
+ .append($('<td class="table-title"></td>').append($(`<span title="${item.path}"></span>`).text(item.name)))
+ .append($('<td class="table-url"></td>').text(item.url))
+ .append($('<td></td>').text(item.status))
+ .append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm')))
+ );
+ });
+ });
+ });
+ </script>
+</body>
+
+</html>
\ No newline at end of file
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>履歴 | MyBrowser</title>
- <link href="my://style.css" rel="stylesheet">
- <link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/paper/bootstrap.min.css" rel="stylesheet"
- integrity="sha384-czdUt3c5InCk6AjJWW7zMMS5xcvRAyC6tWoWfXuRYfX6Vvv4Es8m8eRjzMChD493" crossorigin="anonymous">
- <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" rel="stylesheet">
- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
- <link rel="icon" sizes="any" href="my://public.svg" type="image/svg+xml">
- <link rel="mask-icon" href="my://public.svg" color="black">
- <style>
- .table-style {
- table-layout: fixed;
- white-space: nowrap;
+ <title>履歴</title>
+ <link href="flast://style.css" type="text/css" rel="stylesheet" />
+ <script>
+ if (getDarkTheme()) {
+ document.write(
+ `<link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/darkly/bootstrap.min.css" type="text/css" rel="stylesheet" integrity="sha384-pKJMCXwCXq3HwRBt27cwwSmc0/DAo2BjRxGd7nEESEStk++p6LffHmhX9oqzVDUk" crossorigin="anonymous" />`
+ );
+ } else {
+ document.write(
+ `<link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/flatly/bootstrap.min.css" type="text/css" rel="stylesheet" integrity="sha384-bfWZLPtvQKHg/nZNhaO/ZW4Ba8ISud5CtEjnCTU6OR1yOq5zrrF+JP2o7om6rzLf" crossorigin="anonymous" />`
+ );
}
-
- .table-style th.table-title,
- .table-style td.table-title {
- width: 400px;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
-
- .table-style th.table-url,
- .table-style td.table-url {
- width: calc(100% - 600px);
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- </style>
+ </script>
+ <link href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.min.css" type="text/css" rel="stylesheet" />
+ <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" type="text/css"
+ rel="stylesheet" />
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" type="text/css" rel="stylesheet" />
+ <link rel="icon" sizes="any" href="flast://public.svg" type="image/svg+xml">
+ <link rel="mask-icon" href="flast://public.svg" color="black">
</head>
-<body>
- <header class="topbar">
- <div class="nav-toggle">
- <i class="material-icons">
- menu
- </i>
+<body style="padding-top: 75px;">
+ <nav class="navbar navbar-default navbar-fixed-top">
+ <div class="container-fluid">
+ <div class="navbar-header">
+ <a class="navbar-brand">
+ <script>document.write(getAppName());</script></a>
+ <ul class="nav navbar-nav navbar-right">
+ <li><a href="#" data-toggle="modal" data-target="#clearModal">履歴をクリア</a></li>
+ </ul>
+ </div>
</div>
- <h5 class="title">履歴</h5>
- <button type="button" class="btn btn-link" style="margin-left: auto;" data-toggle="modal"
- data-target="#clearModal">
- 閲覧履歴をクリア
- </button>
- </header>
- <div class="nav">
- </div>
- <div class="container">
- <div class="panel panel-default" id="design">
- <div class="panel-heading">履歴</div>
- <div class="panel-body">
- <div class="table-responsive">
- <table class="table table-striped table-hover table-style" id="historyList">
- <thead>
- <tr>
- <th class="table-title">タイトル</th>
- <th class="table-url">URL</th>
- <th style="width: 200px; white-space: nowrap;">閲覧日時</th>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
+ </nav>
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-3">
+ <ul class="nav nav-pills nav-stacked">
+ <li>
+ <a href="flast://home/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">home</i>
+ ホーム
+ </a>
+ </li>
+ <hr>
+ <li>
+ <a href="flast://history/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">history</i>
+ 履歴
+ </a>
+ </li>
+ <li>
+ <a href="flast://downloads/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">get_app</i>
+ ダウンロード
+ </a>
+ </li>
+ <li>
+ <a href="flast://bookmarks/">
+ <i class="material-icons"
+ style="vertical-align: text-bottom; font-size: 16px;">bookmarks</i> ブックマーク
+ </a>
+ </li>
+ <li>
+ <a href="flast://store/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">shop</i>
+ WebApp Store
+ </a>
+ </li>
+ <li class="dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">settings</i>
+ 設定
+ </a>
+ <ul class="dropdown-menu" style="width: 100%;">
+ <li><a href="flast://settings/">ホーム</a></li>
+ <li class="divider"></li>
+ <li><a href="flast://settings/#design">デザイン</a></li>
+ <li><a href="flast://settings/#engine">検索エンジン</a></li>
+ <li><a href="flast://settings/#adblock">広告ブロック</a></li>
+ <li><a href="flast://settings/#window">ウィンドウ</a></li>
+ <li class="divider"></li>
+ <li><a href="flast://settings/#about">
+ <script>document.write(getAppName());</script> について</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="flast://help/">
+ <i class="material-icons"
+ style="vertical-align: text-bottom; font-size: 16px;">help_outline</i> ヘルプ
+ </a>
+ </li>
+ </ul>
+ </div>
+ <div class="col-md-9" style="padding-right: 0px;">
+ <div style="padding: 15px; overflow-y: auto; height: calc(100vh - 75px);">
+ <h3>履歴</h3>
+ <hr>
+ <div class="table-responsive">
+ <table class="table table-striped table-hover table-style" id="historyList">
+ <thead>
+ <tr>
+ <th class="table-icon"></th>
+ <th class="table-title">タイトル</th>
+ <th class="table-url">URL</th>
+ <th class="table-date">閲覧日時</th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
</div>
</div>
</div>
<h4 class="modal-title">閲覧履歴をクリア</h4>
</div>
<div class="modal-body">
- これまでの閲覧履歴をクリアします。
+ これまでの閲覧履歴をクリアします。<br>
続行を押すと閲覧履歴がクリアされます。
</div>
<div class="modal-footer">
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/locale/ja.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/locale/ja.js"></script>
<script type="text/javascript">
$(document).ready(function () {
- $('.nav a[href="' + window.location.pathname + '"]').parent().addClass('active');
+ $(`a[href="${window.location.href}"]`).parent().addClass('active');
$('#clearHistory').click(function () {
clearHistory(true);
getHistorys().then((data) => {
data.forEach((item, i) => {
- $('#historyList').append($('<tr></tr>').append($('<td class="table-title"></td>').append($(`<a href="${item.url}"></a>`).text(item.title))).append($('<td class="table-url"></td>').text(item.url)).append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm'))));
+ $('#historyList').append(
+ $('<tr></tr>')
+ .append($('<td class="table-icon"></td>').append($(`<img src="http://www.google.com/s2/favicons?domain=${new URL(item.url).origin}" />`)))
+ .append($('<td class="table-title"></td>').append($(`<a href="${item.url}"></a>`).text(item.title)))
+ .append($('<td class="table-url"></td>').text(item.url))
+ .append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm')))
+ );
});
});
});
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>ホーム</title>
- <link href="my://style.css" type="text/css" rel="stylesheet" />
+ <link href="flast://style.css" type="text/css" rel="stylesheet" />
<script>
- if (getDarkTheme()) {
+ if (getDarkTheme() || navigator.userAgent.indexOf('PrivMode') != -1) {
document.write(
`<link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/darkly/bootstrap.min.css" type="text/css" rel="stylesheet" integrity="sha384-pKJMCXwCXq3HwRBt27cwwSmc0/DAo2BjRxGd7nEESEStk++p6LffHmhX9oqzVDUk" crossorigin="anonymous" />`
);
}
</script>
<link href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.min.css" type="text/css" rel="stylesheet" />
- <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" type="text/css" rel="stylesheet" />
+ <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" type="text/css"
+ rel="stylesheet" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" type="text/css" rel="stylesheet" />
- <link rel="icon" sizes="any" href="my://public.svg" type="image/svg+xml">
- <link rel="mask-icon" href="my://public.svg" color="black">
+ <link rel="icon" sizes="any" href="flast://public.svg" type="image/svg+xml">
+ <link rel="mask-icon" href="flast://public.svg" color="black">
</head>
<body style="padding-top: 75px;">
<a class="navbar-brand">
<script>document.write(getAppName());</script></a>
<div class="navbar-form navbar-right" role="search" style="width: 75%;">
- <input class="form-control" id="search" placeholder="Google で検索または URL を入力" style="width: 90%;"
- onkeydown="handleKeydown();">
+ <input class="form-control" id="search" placeholder="Google で検索または URL を入力"
+ style="width: calc(100% - 120px);" onkeydown="handleKeydown();">
<button type="submit" class="btn btn-default">Search</button>
</div>
</div>
<div class="col-md-3">
<ul class="nav nav-pills nav-stacked">
<li>
- <a href="my://home/">
+ <a href="flast://home/">
<i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">home</i>
ホーム
</a>
</li>
<hr>
<li>
- <a href="my://history/" target="_blank">
+ <a href="flast://history/" target="_blank">
<i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">history</i>
履歴
</a>
</li>
<li>
- <a href="my://downloads/" target="_blank">
+ <a href="flast://downloads/" target="_blank">
<i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">get_app</i>
ダウンロード
</a>
</li>
<li>
- <a href="my://bookmarks/" target="_blank">
+ <a href="flast://bookmarks/" target="_blank">
<i class="material-icons"
style="vertical-align: text-bottom; font-size: 16px;">bookmarks</i> ブックマーク
</a>
</li>
<li>
- <a href="my://store/" target="_blank">
+ <a href="flast://store/" target="_blank">
<i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">shop</i>
WebApp Store
</a>
設定
</a>
<ul class="dropdown-menu" style="width: 100%;">
- <li><a href="my://settings/" target="_blank">ホーム</a></li>
+ <li><a href="flast://settings/" target="_blank">ホーム</a></li>
<li class="divider"></li>
- <li><a href="my://settings/#design" target="_blank">デザイン</a></li>
- <li><a href="my://settings/#engine" target="_blank">検索エンジン</a></li>
- <li><a href="my://settings/#adblock" target="_blank">広告ブロック</a></li>
- <li><a href="my://settings/#window" target="_blank">ウィンドウ</a></li>
+ <li><a href="flast://settings/#design" target="_blank">デザイン</a></li>
+ <li><a href="flast://settings/#engine" target="_blank">検索エンジン</a></li>
+ <li><a href="flast://settings/#adblock" target="_blank">広告ブロック</a></li>
+ <li><a href="flast://settings/#window" target="_blank">ウィンドウ</a></li>
<li class="divider"></li>
- <li><a href="my://settings/#about" target="_blank">
+ <li><a href="flast://settings/#about" target="_blank">
<script>document.write(getAppName());</script> について</a></li>
</ul>
</li>
<li>
- <a href="my://help/" target="_blank">
+ <a href="flast://help/" target="_blank">
<i class="material-icons"
style="vertical-align: text-bottom; font-size: 16px;">help_outline</i> ヘルプ
</a>
localStorage.setItem('isFirst', false);
}
</script>
+ <h3>ホーム</h3>
+ <hr>
<script>
if (navigator.userAgent.indexOf('PrivMode') != -1) {
document.write(
- `<h5>プライベート モード</h5>
- <hr>
- <p>
- 現在、プライベート モードで閲覧しています。プライベート モードでは、閲覧履歴やCookieなどが${getAppName()}に保存されません。<br>
+ `<div class="panel panel-default" id="normal">
+ <div class="panel-heading">プライベート モード</div>
+ <div class="panel-body">
+ 現在、プライベート モードで閲覧しています。<br>
+ プライベート モードでは、閲覧履歴やCookieなどが${getAppName()}に保存されません。<br>
また、ブックマークはプライベート ブックマークに保存されます。<br>
※ プライベート ブックマークは、プライベート モードの時のみブックマークの表示や編集ができる機能です。<br>
ただし、ダウンロードしたファイルは通常通り保存されます。<br><br>
<li>Cookieとサイトデータ</li>
<li>ログイン情報</li>
</ul>
- </p>`
+ ${getAppName()} に<b>以下の情報は</b>保存されます。<br>
+ <ul>
+ <li>ダウンロード情報</li>
+ <li>プライベート ブックマーク</li>
+ </ul>
+ </div>
+ </div>`
);
}
</script>
- <h3>ホーム</h3>
- <hr>
<div class="panel panel-default" id="normal">
<div class="panel-heading">
最近の履歴
- <a href="my://history" target="_blank" class="text-muted"
+ <a href="flast://history" target="_blank" class="text-muted"
style="float: right;">すべての履歴を表示</a>
</div>
<div class="panel-body">
<table class="table table-striped table-hover table-style" id="historyList">
<thead>
<tr>
+ <th class="table-icon"></th>
<th class="table-title">タイトル</th>
<th class="table-url">URL</th>
- <th style="width: 200px; white-space: nowrap;">閲覧日時</th>
+ <th class="table-date">閲覧日時</th>
</tr>
</thead>
<tbody>
let v = 0;
data.forEach((item, i) => {
if (v > 9) return;
- $('#historyList').append($('<tr></tr>').append($('<td class="table-title"></td>').append($(`<a href="${item.url}"></a>`).text(item.title))).append($('<td class="table-url"></td>').text(item.url)).append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm'))));
+ $('#historyList').append(
+ $('<tr></tr>')
+ .append($('<td class="table-icon"></td>').append($(`<img src="http://www.google.com/s2/favicons?domain=${new URL(item.url).origin}" />`)))
+ .append($('<td class="table-title"></td>').append($(`<a href="${item.url}"></a>`).text(item.title)))
+ .append($('<td class="table-url"></td>').text(item.url))
+ .append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm')))
+ );
v++;
});
});
let searchBar = $('#search');
if (event.keyCode != 13 || searchBar.val().length == 0 || searchBar.val() == '') return;
+ /*
if (isURL(searchBar.val())) {
location.href = searchBar.val();
} else {
location.href = window.getSearchEngine().url.replace('%s', searchBar.val());
}
+ */
+
+ if (isURL(searchBar.val()) && !searchBar.val().includes('://')) {
+ location.href = `http://${searchBar.val()}`;
+ } else if (!searchBar.val().includes('://')) {
+ location.href = getSearchEngine().url.replace('%s', searchBar.val());
+ } else {
+ location.href = searchBar.val();
+ }
}
function isURL(input) {
- const pattern = /^((?:\w+:)?\/\/([^\s.]+\.\S{2}|localhost[:?\d]*)|my:\/\/\S.*)\S*$/;
+ const pattern = /^((?:\w+:)?\/\/([^\s.]+\.\S{2}|localhost[:?\d]*)|flast:\/\/\S.*)\S*$/;
if (pattern.test(input)) {
return true;
-<!DOCTYPE html>
-<html lang="ja">
-
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>新しいタブ | MyBrowser</title>
- <link href="my://style.css" rel="stylesheet">
- <link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/paper/bootstrap.min.css" rel="stylesheet"
- integrity="sha384-czdUt3c5InCk6AjJWW7zMMS5xcvRAyC6tWoWfXuRYfX6Vvv4Es8m8eRjzMChD493" crossorigin="anonymous">
- <link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css" rel="stylesheet">
- <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" rel="stylesheet">
- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
- <link rel="icon" sizes="any" href="my://public.svg" type="image/svg+xml">
- <link rel="mask-icon" href="my://public.svg" color="black">
- <style>
- .table-style {
- table-layout: fixed;
- white-space: nowrap;
- }
-
- .table-style th.table-title,
- .table-style td.table-title {
- width: 400px;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
-
- .table-style th.table-url,
- .table-style td.table-url {
- width: calc(100% - 600px);
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- </style>
-</head>
-
-<body>
- <header class="topbar">
- <div class="nav-toggle">
- <i class="material-icons">
- menu
- </i>
- </div>
- <h5 class="title">新しいタブ</h5>
- <input class="topbar-search" id="search" placeholder="Google で検索または URL を入力" onkeydown="handleKeydown();">
- <div class="btn btn-primary topbar-search-btn">
- <i class="material-icons">
- search
- </i>
- </div>
- </header>
- <div class="nav">
- <a class="nav-item" href="my://history" target="_blank">
- <i class="material-icons">history</i>
- <span>履歴</span>
- </a>
- <a class="nav-item" href="my://bookmark" target="_blank">
- <i class="material-icons">bookmark</i>
- <span>ブックマーク</span>
- </a>
- <div class="nav-item separator"></div>
- <a class="nav-item" href="my://store" target="_blank">
- <i class="material-icons">store</i>
- <span>WebApp Store</span>
- </a>
- <div class="nav-item separator"></div>
- <a class="nav-item" href="my://help" target="_blank">
- <i class="material-icons">help</i>
- <span>ヘルプ</span>
- </a>
- <a class="nav-item" href="my://settings" target="_blank">
- <i class="material-icons">settings</i>
- <span>設定</span>
- </a>
- <div class="nav-item separator"></div>
- </div>
- <div class="container">
- <script>
- if (navigator.userAgent.indexOf('PrivMode') != -1) {
- document.write(
- `<h5>プライベート モード</h5>
- <hr>
- <p>
- 現在、プライベート モードで閲覧しています。プライベート モードでは、閲覧履歴やCookie等がMyBrowserに保存されません。<br>
- また、ブックマークはプライベート ブックマークに保存されます。<br>
- ※ プライベート ブックマークは、プライベート モードの時のみブックマークの表示や編集ができる機能です。<br>
- ただし、ダウンロードしたファイルは通常通り保存されます。<br><br>
- MyBrowser に<b>以下の情報は</b>保存されません。<br>
- <ul>
- <li>閲覧履歴</li>
- <li>Cookieとサイトデータ</li>
- <li>ログイン情報</li>
- </ul>
- </p>`
- );
- }
- </script>
- <h5>最近の履歴</h5>
- <hr>
- <div class="table-responsive">
- <table class="table table-striped table-hover table-style" id="historyList">
- <thead>
- <tr>
- <th class="table-title">タイトル</th>
- <th class="table-url">URL</th>
- <th style="width: 200px; white-space: nowrap;">閲覧日時</th>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
- </div>
- </div>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
- <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
- <script type="text/javascript">
- $(document).ready(function () {
- $('.nav a[href="' + window.location.pathname + '"]').parent().addClass('active');
-
- $('#search').prop('placeholder', `${getSearchEngine().name} で検索または URL を入力`);
-
- $('#search').autocomplete({
- source: function (request, response) {
- $.ajax({
- url: "http://www.google.com/complete/search",
- data: { hl: 'ja', client: 'firefox', q: request.term },
- dataType: "jsonp",
- type: "GET",
- success: function (data) {
- response(data[1]);
- }
- });
- },
- delay: 300,
- minLength: 2,
- });
-
- if (getDarkTheme()) {
- $('.topbar').css({ 'background-color': '#323232', 'color': 'white' });
- $('.topbar > .title').css('color', 'white');
- $('.topbar-search').css({ 'background-color': '#252525', 'color': 'white' });
- $('div.nav > a.nav-item').css('color', 'white');
- $('body').css('background-color', '#252525');
-
- $('.nav-toggle').hover(function () {
- $(this).css('background-color', 'rgba(130, 130, 130, 0.3)');
- }, function () {
- $(this).css('background-color', '');
- });
- } else {
- $('.topbar').css({ 'background-color': '', 'color': '' });
- $('.topbar > .title').css('color', '');
- $('.topbar-search').css({ 'background-color': '', 'color': '' });
- $('div.nav > a.nav-item').css('color', '');
- $('body').css('background-color', '');
-
- $('.nav-toggle').hover(function () {
- $(this).css('background-color', 'rgba(0, 0, 0, 0.06)');
- }, function () {
- $(this).css('background-color', '');
- });
- }
-
- getHistorys().then((data) => {
- let v = 0;
- data.forEach((item, i) => {
- if (v > 9) return;
- $('#historyList').append($('<tr></tr>').append($('<td class="table-title"></td>').append($(`<a href="${item.url}"></a>`).text(item.title))).append($('<td class="table-url"></td>').text(item.url)).append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm'))));
- v++;
- });
- });
- });
-
- function handleKeydown() {
- let searchBar = $('#search');
- if (event.keyCode != 13 || searchBar.val().length == 0 || searchBar.val() == '') return;
-
- if (isURL(searchBar.val())) {
- location.href = searchBar.val();
- } else {
- location.href = window.getSearchEngine().url.replace('%s', searchBar.val());
- }
- }
-
- function isURL(input) {
- const pattern = /^((?:\w+:)?\/\/([^\s.]+\.\S{2}|localhost[:?\d]*)|my:\/\/\S.*)\S*$/;
-
- if (pattern.test(input)) {
- return true;
- }
- return pattern.test(`http://${input}`);
- }
- </script>
-</body>
-
-</html>
\ No newline at end of file
+<meta http-equiv="refresh" content="0;URL='flast://home'" />
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <title>Document</title>
+ <link rel="icon" sizes="any" href="my://public.svg" type="image/svg+xml">
+ <link rel="mask-icon" href="my://public.svg" color="black">
+</head>
+<body>
+ HTMl
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<html lang="ja">
+
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <title>ブックマーク</title>
+ <link href="my://style.css" type="text/css" rel="stylesheet" />
+ <script>
+ if (getDarkTheme()) {
+ document.write(
+ `<link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/darkly/bootstrap.min.css" type="text/css" rel="stylesheet" integrity="sha384-pKJMCXwCXq3HwRBt27cwwSmc0/DAo2BjRxGd7nEESEStk++p6LffHmhX9oqzVDUk" crossorigin="anonymous" />`
+ );
+ } else {
+ document.write(
+ `<link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/flatly/bootstrap.min.css" type="text/css" rel="stylesheet" integrity="sha384-bfWZLPtvQKHg/nZNhaO/ZW4Ba8ISud5CtEjnCTU6OR1yOq5zrrF+JP2o7om6rzLf" crossorigin="anonymous" />`
+ );
+ }
+ </script>
+ <link href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.min.css" type="text/css" rel="stylesheet" />
+ <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" type="text/css" rel="stylesheet" />
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" type="text/css" rel="stylesheet" />
+ <link rel="icon" sizes="any" href="my://public.svg" type="image/svg+xml">
+ <link rel="mask-icon" href="my://public.svg" color="black">
+</head>
+
+<body style="padding-top: 75px;">
+ <nav class="navbar navbar-default navbar-fixed-top">
+ <div class="container-fluid">
+ <div class="navbar-header">
+ <a class="navbar-brand"><script>document.write(getAppName());</script></a>
+ <ul class="nav navbar-nav navbar-right">
+ <li><a href="#" data-toggle="modal" data-target="#clearModal">ブックマークをクリア</a></li>
+ </ul>
+ </div>
+ </div>
+ </nav>
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-3">
+ <ul class="nav nav-pills nav-stacked">
+ <li>
+ <a href="my://home/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">home</i>
+ ホーム
+ </a>
+ </li>
+ <hr>
+ <li>
+ <a href="my://history/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">history</i>
+ 履歴
+ </a>
+ </li>
+ <li>
+ <a href="my://downloads/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">get_app</i>
+ ダウンロード
+ </a>
+ </li>
+ <li>
+ <a href="my://bookmarks/">
+ <i class="material-icons"
+ style="vertical-align: text-bottom; font-size: 16px;">bookmarks</i> ブックマーク
+ </a>
+ </li>
+ <li>
+ <a href="my://store/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">shop</i>
+ WebApp Store
+ </a>
+ </li>
+ <li class="dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">settings</i>
+ 設定
+ </a>
+ <ul class="dropdown-menu" style="width: 100%;">
+ <li><a href="my://settings/">ホーム</a></li>
+ <li class="divider"></li>
+ <li><a href="my://settings/#design">デザイン</a></li>
+ <li><a href="my://settings/#engine">検索エンジン</a></li>
+ <li><a href="my://settings/#adblock">広告ブロック</a></li>
+ <li><a href="my://settings/#window">ウィンドウ</a></li>
+ <li class="divider"></li>
+ <li><a href="my://settings/#about"><script>document.write(getAppName());</script> について</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="my://help/">
+ <i class="material-icons"
+ style="vertical-align: text-bottom; font-size: 16px;">help_outline</i> ヘルプ
+ </a>
+ </li>
+ </ul>
+ </div>
+ <div class="col-md-9" style="padding-right: 0px;">
+ <div style="padding: 15px; overflow-y: auto; height: calc(100vh - 75px);">
+ <h3>ブックマーク</h3>
+ <hr>
+ <script>
+ if (navigator.userAgent.indexOf('PrivMode') != -1) {
+ document.write(
+ `<div class="panel panel-default" id="private">
+ <div class="panel-heading">プライベート ブックマーク</div>
+ <div class="panel-body">
+ <div class="table-responsive">
+ <table class="table table-striped table-hover table-style" id="privMarkList">
+ <thead>
+ <tr>
+ <th class="table-title">タイトル</th>
+ <th class="table-url">URL</th>
+ <th style="width: 200px; white-space: nowrap;">追加日時</th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <hr>`
+ );
+ }
+ </script>
+ <div class="panel panel-default" id="normal">
+ <div class="panel-heading">ブックマーク</div>
+ <div class="panel-body">
+ <div class="table-responsive">
+ <table class="table table-striped table-hover table-style" id="markList">
+ <thead>
+ <tr>
+ <th class="table-title">タイトル</th>
+ <th class="table-url">URL</th>
+ <th style="width: 200px; white-space: nowrap;">追加日時</th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="modal fade" id="clearModal" tabindex="-1">
+ <div class="modal-dialog" style="z-index: 9999;">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal"><span>×</span></button>
+ <h4 class="modal-title">ブックマークをクリア</h4>
+ </div>
+ <div class="modal-body">
+ これまでのブックマークをクリアします。
+ 続行を押すとブックマークがクリアされます。
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-link" data-dismiss="modal">閉じる</button>
+ <button type="button" class="btn btn-primary" id="clearBookmark">続行</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/locale/ja.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function () {
+ $(`a[href="${window.location.href}"]`).parent().addClass('active');
+
+ $('#clearBookmark').click(function () {
+ clearBookmark(true);
+ location.reload();
+ });
+
+ if (navigator.userAgent.indexOf('PrivMode') != -1) {
+ getBookmarks(true).then((data) => {
+ data.forEach((item, i) => {
+ $('#privMarkList').append($('<tr></tr>').append($('<td class="table-title"></td>').append($(`<a href="${item.url}"></a>`).text(item.title))).append($('<td class="table-url"></td>').text(item.url)).append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm'))));
+ });
+ getBookmarks(false).then((data) => {
+ data.forEach((item, i) => {
+ $('#markList').append($('<tr></tr>').append($('<td class="table-title"></td>').append($(`<a href="${item.url}"></a>`).text(item.title))).append($('<td class="table-url"></td>').text(item.url)).append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm'))));
+ });
+ });
+ });
+ } else {
+ getBookmarks(false).then((data) => {
+ data.forEach((item, i) => {
+ $('#markList').append($('<tr></tr>').append($('<td class="table-title"></td>').append($(`<a href="${item.url}"></a>`).text(item.title))).append($('<td class="table-url"></td>').text(item.url)).append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm'))));
+ });
+ });
+ }
+ });
+ </script>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<html lang="ja">
+
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <title>Credits | MyBrowser</title>
+ <link href="my://style.css" rel="stylesheet">
+ <link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/paper/bootstrap.min.css" rel="stylesheet"
+ integrity="sha384-czdUt3c5InCk6AjJWW7zMMS5xcvRAyC6tWoWfXuRYfX6Vvv4Es8m8eRjzMChD493" crossorigin="anonymous">
+ <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" rel="stylesheet">
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+ <link rel="icon" sizes="any" href="my://public.svg" type="image/svg+xml">
+ <link rel="mask-icon" href="my://public.svg" color="black">
+</head>
+
+<body>
+ <header class="topbar">
+ <div class="nav-toggle">
+ <i class="material-icons">
+ menu
+ </i>
+ </div>
+ <h5 class="title">Credits</h5>
+ </header>
+ <div class="nav">
+ </div>
+ <div class="container">
+ <div class="panel panel-default" id="about">
+ <div class="panel-heading">Credits</div>
+ <div class="panel-body">
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-12">
+ <ul>
+ <li>Chromium</li>
+ <li>Electron</li>
+ <li>electron-store</li>
+ <li>electron-platform</li>
+ <li>React</li>
+ <li>Styled-Components</li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function () {
+ $('.nav a[href="' + window.location.pathname + '"]').parent().addClass('active');
+ });
+ </script>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<html lang="ja">
+
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <title>デバッグ | MyBrowser</title>
+ <link href="my://style.css" rel="stylesheet">
+ <link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/paper/bootstrap.min.css" rel="stylesheet"
+ integrity="sha384-czdUt3c5InCk6AjJWW7zMMS5xcvRAyC6tWoWfXuRYfX6Vvv4Es8m8eRjzMChD493" crossorigin="anonymous">
+ <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" rel="stylesheet">
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+ <link rel="icon" sizes="any" href="my://public.svg" type="image/svg+xml">
+ <link rel="mask-icon" href="my://public.svg" color="black">
+</head>
+
+<body>
+ <header class="topbar">
+ <div class="nav-toggle">
+ <i class="material-icons">
+ menu
+ </i>
+ </div>
+ <h5 class="title">デバッグ</h5>
+ </header>
+ <div class="nav">
+ </div>
+ <div class="container">
+ <h1>🐬の人: おれんじ</h1>
+ </div>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function () {
+ $('.nav a[href="' + window.location.pathname + '"]').parent().addClass('active');
+ });
+ </script>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<html lang="ja">
+
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <title>履歴 | MyBrowser</title>
+ <link href="my://style.css" rel="stylesheet">
+ <link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/paper/bootstrap.min.css" rel="stylesheet"
+ integrity="sha384-czdUt3c5InCk6AjJWW7zMMS5xcvRAyC6tWoWfXuRYfX6Vvv4Es8m8eRjzMChD493" crossorigin="anonymous">
+ <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" rel="stylesheet">
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+ <link rel="icon" sizes="any" href="my://public.svg" type="image/svg+xml">
+ <link rel="mask-icon" href="my://public.svg" color="black">
+ <style>
+ .table-style {
+ table-layout: fixed;
+ white-space: nowrap;
+ }
+
+ .table-style th.table-title,
+ .table-style td.table-title {
+ width: 400px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+
+ .table-style th.table-url,
+ .table-style td.table-url {
+ width: calc(100% - 600px);
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+ </style>
+</head>
+
+<body>
+ <header class="topbar">
+ <div class="nav-toggle">
+ <i class="material-icons">
+ menu
+ </i>
+ </div>
+ <h5 class="title">履歴</h5>
+ <button type="button" class="btn btn-link" style="margin-left: auto;" data-toggle="modal"
+ data-target="#clearModal">
+ 閲覧履歴をクリア
+ </button>
+ </header>
+ <div class="nav">
+ </div>
+ <div class="container">
+ <div class="panel panel-default" id="design">
+ <div class="panel-heading">履歴</div>
+ <div class="panel-body">
+ <div class="table-responsive">
+ <table class="table table-striped table-hover table-style" id="historyList">
+ <thead>
+ <tr>
+ <th class="table-title">タイトル</th>
+ <th class="table-url">URL</th>
+ <th style="width: 200px; white-space: nowrap;">閲覧日時</th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="modal fade" id="clearModal" tabindex="-1">
+ <div class="modal-dialog" style="z-index: 9999;">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal"><span>×</span></button>
+ <h4 class="modal-title">閲覧履歴をクリア</h4>
+ </div>
+ <div class="modal-body">
+ これまでの閲覧履歴をクリアします。
+ 続行を押すと閲覧履歴がクリアされます。
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-link" data-dismiss="modal">閉じる</button>
+ <button type="button" class="btn btn-primary" id="clearHistory">続行</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/locale/ja.js"></script>
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function () {
+ $('.nav a[href="' + window.location.pathname + '"]').parent().addClass('active');
+
+ $('#clearHistory').click(function () {
+ clearHistory(true);
+ location.reload();
+ });
+
+ getHistorys().then((data) => {
+ data.forEach((item, i) => {
+ $('#historyList').append($('<tr></tr>').append($('<td class="table-title"></td>').append($(`<a href="${item.url}"></a>`).text(item.title))).append($('<td class="table-url"></td>').text(item.url)).append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm'))));
+ });
+ });
+ });
+ </script>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<html lang="ja">
+
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <title>ホーム</title>
+ <link href="my://style.css" type="text/css" rel="stylesheet" />
+ <script>
+ if (getDarkTheme()) {
+ document.write(
+ `<link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/darkly/bootstrap.min.css" type="text/css" rel="stylesheet" integrity="sha384-pKJMCXwCXq3HwRBt27cwwSmc0/DAo2BjRxGd7nEESEStk++p6LffHmhX9oqzVDUk" crossorigin="anonymous" />`
+ );
+ } else {
+ document.write(
+ `<link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/flatly/bootstrap.min.css" type="text/css" rel="stylesheet" integrity="sha384-bfWZLPtvQKHg/nZNhaO/ZW4Ba8ISud5CtEjnCTU6OR1yOq5zrrF+JP2o7om6rzLf" crossorigin="anonymous" />`
+ );
+ }
+ </script>
+ <link href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.min.css" type="text/css" rel="stylesheet" />
+ <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" type="text/css" rel="stylesheet" />
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" type="text/css" rel="stylesheet" />
+ <link rel="icon" sizes="any" href="my://public.svg" type="image/svg+xml">
+ <link rel="mask-icon" href="my://public.svg" color="black">
+</head>
+
+<body style="padding-top: 75px;">
+ <nav class="navbar navbar-default navbar-fixed-top">
+ <div class="container-fluid">
+ <div class="navbar-header">
+ <a class="navbar-brand">
+ <script>document.write(getAppName());</script></a>
+ <div class="navbar-form navbar-right" role="search" style="width: 75%;">
+ <input class="form-control" id="search" placeholder="Google で検索または URL を入力" style="width: 90%;"
+ onkeydown="handleKeydown();">
+ <button type="submit" class="btn btn-default">Search</button>
+ </div>
+ </div>
+ </div>
+ </nav>
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-3">
+ <ul class="nav nav-pills nav-stacked">
+ <li>
+ <a href="my://home/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">home</i>
+ ホーム
+ </a>
+ </li>
+ <hr>
+ <li>
+ <a href="my://history/" target="_blank">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">history</i>
+ 履歴
+ </a>
+ </li>
+ <li>
+ <a href="my://downloads/" target="_blank">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">get_app</i>
+ ダウンロード
+ </a>
+ </li>
+ <li>
+ <a href="my://bookmarks/" target="_blank">
+ <i class="material-icons"
+ style="vertical-align: text-bottom; font-size: 16px;">bookmarks</i> ブックマーク
+ </a>
+ </li>
+ <li>
+ <a href="my://store/" target="_blank">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">shop</i>
+ WebApp Store
+ </a>
+ </li>
+ <li class="dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">settings</i>
+ 設定
+ </a>
+ <ul class="dropdown-menu" style="width: 100%;">
+ <li><a href="my://settings/" target="_blank">ホーム</a></li>
+ <li class="divider"></li>
+ <li><a href="my://settings/#design" target="_blank">デザイン</a></li>
+ <li><a href="my://settings/#engine" target="_blank">検索エンジン</a></li>
+ <li><a href="my://settings/#adblock" target="_blank">広告ブロック</a></li>
+ <li><a href="my://settings/#window" target="_blank">ウィンドウ</a></li>
+ <li class="divider"></li>
+ <li><a href="my://settings/#about" target="_blank">
+ <script>document.write(getAppName());</script> について</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="my://help/" target="_blank">
+ <i class="material-icons"
+ style="vertical-align: text-bottom; font-size: 16px;">help_outline</i> ヘルプ
+ </a>
+ </li>
+ </ul>
+ </div>
+ <div class="col-md-9" style="padding-right: 0px;">
+ <div style="padding: 15px; overflow-y: auto; height: calc(100vh - 75px);">
+ <script>
+ if (localStorage.getItem('isFirst') == true || localStorage.getItem('isFirst') == undefined) {
+ document.write(
+ `<div class="jumbotron">
+ <div class="container">
+ <h1>ようこそ</h1>
+ <p>新しいタブ ページはホームとして生まれ変わりました。</p>
+ </div>
+ </div>`
+ );
+ localStorage.setItem('isFirst', false);
+ }
+ </script>
+ <script>
+ if (navigator.userAgent.indexOf('PrivMode') != -1) {
+ document.write(
+ `<h5>プライベート モード</h5>
+ <hr>
+ <p>
+ 現在、プライベート モードで閲覧しています。プライベート モードでは、閲覧履歴やCookieなどが${getAppName()}に保存されません。<br>
+ また、ブックマークはプライベート ブックマークに保存されます。<br>
+ ※ プライベート ブックマークは、プライベート モードの時のみブックマークの表示や編集ができる機能です。<br>
+ ただし、ダウンロードしたファイルは通常通り保存されます。<br><br>
+ ${getAppName()} に<b>以下の情報は</b>保存されません。<br>
+ <ul>
+ <li>閲覧履歴</li>
+ <li>Cookieとサイトデータ</li>
+ <li>ログイン情報</li>
+ </ul>
+ </p>`
+ );
+ }
+ </script>
+ <h3>ホーム</h3>
+ <hr>
+ <div class="panel panel-default" id="normal">
+ <div class="panel-heading">
+ 最近の履歴
+ <a href="my://history" target="_blank" class="text-muted"
+ style="float: right;">すべての履歴を表示</a>
+ </div>
+ <div class="panel-body">
+ <div class="table-responsive">
+ <table class="table table-striped table-hover table-style" id="historyList">
+ <thead>
+ <tr>
+ <th class="table-title">タイトル</th>
+ <th class="table-url">URL</th>
+ <th style="width: 200px; white-space: nowrap;">閲覧日時</th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/locale/ja.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function () {
+ $(`a[href="${window.location.href}"]`).parent().addClass('active');
+
+ $('#search').prop('placeholder', `${getSearchEngine().name} で検索または URL を入力`);
+
+ $('#search').autocomplete({
+ source: function (request, response) {
+ $.ajax({
+ url: "http://www.google.com/complete/search",
+ data: { hl: 'ja', client: 'firefox', q: request.term },
+ dataType: "jsonp",
+ type: "GET",
+ success: function (data) {
+ response(data[1]);
+ }
+ });
+ },
+ delay: 300,
+ minLength: 2,
+ });
+
+ if (getDarkTheme()) {
+ $('.topbar').css({ 'background-color': '#323232', 'color': 'white' });
+ $('.topbar > .title').css('color', 'white');
+ $('.topbar-search').css({ 'background-color': '#252525', 'color': 'white' });
+ $('div.nav > a.nav-item').css('color', 'white');
+ $('body').css('background-color', '#252525');
+
+ $('.nav-toggle').hover(function () {
+ $(this).css('background-color', 'rgba(130, 130, 130, 0.3)');
+ }, function () {
+ $(this).css('background-color', '');
+ });
+ } else {
+ $('.topbar').css({ 'background-color': '', 'color': '' });
+ $('.topbar > .title').css('color', '');
+ $('.topbar-search').css({ 'background-color': '', 'color': '' });
+ $('div.nav > a.nav-item').css('color', '');
+ $('body').css('background-color', '');
+
+ $('.nav-toggle').hover(function () {
+ $(this).css('background-color', 'rgba(0, 0, 0, 0.06)');
+ }, function () {
+ $(this).css('background-color', '');
+ });
+ }
+
+ getHistorys().then((data) => {
+ let v = 0;
+ data.forEach((item, i) => {
+ if (v > 9) return;
+ $('#historyList').append($('<tr></tr>').append($('<td class="table-title"></td>').append($(`<a href="${item.url}"></a>`).text(item.title))).append($('<td class="table-url"></td>').text(item.url)).append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm'))));
+ v++;
+ });
+ });
+ });
+
+ function handleKeydown() {
+ let searchBar = $('#search');
+ if (event.keyCode != 13 || searchBar.val().length == 0 || searchBar.val() == '') return;
+
+ if (isURL(searchBar.val())) {
+ location.href = searchBar.val();
+ } else {
+ location.href = window.getSearchEngine().url.replace('%s', searchBar.val());
+ }
+ }
+
+ function isURL(input) {
+ const pattern = /^((?:\w+:)?\/\/([^\s.]+\.\S{2}|localhost[:?\d]*)|my:\/\/\S.*)\S*$/;
+
+ if (pattern.test(input)) {
+ return true;
+ }
+ return pattern.test(`http://${input}`);
+ }
+ </script>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<html lang="ja">
+
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <title>新しいタブ | MyBrowser</title>
+ <link href="my://style.css" rel="stylesheet">
+ <link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/paper/bootstrap.min.css" rel="stylesheet"
+ integrity="sha384-czdUt3c5InCk6AjJWW7zMMS5xcvRAyC6tWoWfXuRYfX6Vvv4Es8m8eRjzMChD493" crossorigin="anonymous">
+ <link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css" rel="stylesheet">
+ <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" rel="stylesheet">
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+ <link rel="icon" sizes="any" href="my://public.svg" type="image/svg+xml">
+ <link rel="mask-icon" href="my://public.svg" color="black">
+ <style>
+ .table-style {
+ table-layout: fixed;
+ white-space: nowrap;
+ }
+
+ .table-style th.table-title,
+ .table-style td.table-title {
+ width: 400px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+
+ .table-style th.table-url,
+ .table-style td.table-url {
+ width: calc(100% - 600px);
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+ </style>
+</head>
+
+<body>
+ <header class="topbar">
+ <div class="nav-toggle">
+ <i class="material-icons">
+ menu
+ </i>
+ </div>
+ <h5 class="title">新しいタブ</h5>
+ <input class="topbar-search" id="search" placeholder="Google で検索または URL を入力" onkeydown="handleKeydown();">
+ <div class="btn btn-primary topbar-search-btn">
+ <i class="material-icons">
+ search
+ </i>
+ </div>
+ </header>
+ <div class="nav">
+ <a class="nav-item" href="my://history" target="_blank">
+ <i class="material-icons">history</i>
+ <span>履歴</span>
+ </a>
+ <a class="nav-item" href="my://bookmark" target="_blank">
+ <i class="material-icons">bookmark</i>
+ <span>ブックマーク</span>
+ </a>
+ <div class="nav-item separator"></div>
+ <a class="nav-item" href="my://store" target="_blank">
+ <i class="material-icons">store</i>
+ <span>WebApp Store</span>
+ </a>
+ <div class="nav-item separator"></div>
+ <a class="nav-item" href="my://help" target="_blank">
+ <i class="material-icons">help</i>
+ <span>ヘルプ</span>
+ </a>
+ <a class="nav-item" href="my://settings" target="_blank">
+ <i class="material-icons">settings</i>
+ <span>設定</span>
+ </a>
+ <div class="nav-item separator"></div>
+ </div>
+ <div class="container">
+ <script>
+ if (navigator.userAgent.indexOf('PrivMode') != -1) {
+ document.write(
+ `<h5>プライベート モード</h5>
+ <hr>
+ <p>
+ 現在、プライベート モードで閲覧しています。プライベート モードでは、閲覧履歴やCookie等がMyBrowserに保存されません。<br>
+ また、ブックマークはプライベート ブックマークに保存されます。<br>
+ ※ プライベート ブックマークは、プライベート モードの時のみブックマークの表示や編集ができる機能です。<br>
+ ただし、ダウンロードしたファイルは通常通り保存されます。<br><br>
+ MyBrowser に<b>以下の情報は</b>保存されません。<br>
+ <ul>
+ <li>閲覧履歴</li>
+ <li>Cookieとサイトデータ</li>
+ <li>ログイン情報</li>
+ </ul>
+ </p>`
+ );
+ }
+ </script>
+ <h5>最近の履歴</h5>
+ <hr>
+ <div class="table-responsive">
+ <table class="table table-striped table-hover table-style" id="historyList">
+ <thead>
+ <tr>
+ <th class="table-title">タイトル</th>
+ <th class="table-url">URL</th>
+ <th style="width: 200px; white-space: nowrap;">閲覧日時</th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function () {
+ $('.nav a[href="' + window.location.pathname + '"]').parent().addClass('active');
+
+ $('#search').prop('placeholder', `${getSearchEngine().name} で検索または URL を入力`);
+
+ $('#search').autocomplete({
+ source: function (request, response) {
+ $.ajax({
+ url: "http://www.google.com/complete/search",
+ data: { hl: 'ja', client: 'firefox', q: request.term },
+ dataType: "jsonp",
+ type: "GET",
+ success: function (data) {
+ response(data[1]);
+ }
+ });
+ },
+ delay: 300,
+ minLength: 2,
+ });
+
+ if (getDarkTheme()) {
+ $('.topbar').css({ 'background-color': '#323232', 'color': 'white' });
+ $('.topbar > .title').css('color', 'white');
+ $('.topbar-search').css({ 'background-color': '#252525', 'color': 'white' });
+ $('div.nav > a.nav-item').css('color', 'white');
+ $('body').css('background-color', '#252525');
+
+ $('.nav-toggle').hover(function () {
+ $(this).css('background-color', 'rgba(130, 130, 130, 0.3)');
+ }, function () {
+ $(this).css('background-color', '');
+ });
+ } else {
+ $('.topbar').css({ 'background-color': '', 'color': '' });
+ $('.topbar > .title').css('color', '');
+ $('.topbar-search').css({ 'background-color': '', 'color': '' });
+ $('div.nav > a.nav-item').css('color', '');
+ $('body').css('background-color', '');
+
+ $('.nav-toggle').hover(function () {
+ $(this).css('background-color', 'rgba(0, 0, 0, 0.06)');
+ }, function () {
+ $(this).css('background-color', '');
+ });
+ }
+
+ getHistorys().then((data) => {
+ let v = 0;
+ data.forEach((item, i) => {
+ if (v > 9) return;
+ $('#historyList').append($('<tr></tr>').append($('<td class="table-title"></td>').append($(`<a href="${item.url}"></a>`).text(item.title))).append($('<td class="table-url"></td>').text(item.url)).append($('<td></td>').text(moment(item.createdAt).format('YYYY/MM/DD HH:mm'))));
+ v++;
+ });
+ });
+ });
+
+ function handleKeydown() {
+ let searchBar = $('#search');
+ if (event.keyCode != 13 || searchBar.val().length == 0 || searchBar.val() == '') return;
+
+ if (isURL(searchBar.val())) {
+ location.href = searchBar.val();
+ } else {
+ location.href = window.getSearchEngine().url.replace('%s', searchBar.val());
+ }
+ }
+
+ function isURL(input) {
+ const pattern = /^((?:\w+:)?\/\/([^\s.]+\.\S{2}|localhost[:?\d]*)|my:\/\/\S.*)\S*$/;
+
+ if (pattern.test(input)) {
+ return true;
+ }
+ return pattern.test(`http://${input}`);
+ }
+ </script>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<html lang="ja">
+
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <title>設定 | MyBrowser</title>
+ <link href="my://style.css" rel="stylesheet">
+ <link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/paper/bootstrap.min.css" rel="stylesheet"
+ integrity="sha384-czdUt3c5InCk6AjJWW7zMMS5xcvRAyC6tWoWfXuRYfX6Vvv4Es8m8eRjzMChD493" crossorigin="anonymous">
+ <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" rel="stylesheet">
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+ <link rel="icon" sizes="any" href="my://public.svg" type="image/svg+xml">
+ <link rel="mask-icon" href="my://public.svg" color="black">
+</head>
+
+<body>
+ <header class="topbar">
+ <div class="nav-toggle">
+ <i class="material-icons">
+ menu
+ </i>
+ </div>
+ <h5 class="title">設定</h5>
+
+ <button type="button" class="btn btn-link" style="margin-left: auto;" data-toggle="modal"
+ data-target="#textEditorModal">
+ テキストエディタで開く (高度なユーザー用)
+ </button>
+ </header>
+ <div class="nav">
+ </div>
+ <div class="container">
+ <div class="panel panel-default" id="design">
+ <div class="panel-heading">デザイン</div>
+ <div class="panel-body">
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-9">
+ <h6>ホームボタンを表示する</h6>
+ </div>
+ <div class="col-md-3" style="display: flex; align-items: flex-end; flex-direction: column;">
+ <span><input id="homeButton" type="checkbox"></span>
+ </div>
+ </div>
+ </div>
+ <hr>
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-9">
+ <h6>起動時や<a href="my://newtab" target="_blank">新しいタブ</a> ページに使用されるサイト</h6>
+ <p class="text-muted">この設定はホームボタンをクリックしたときにも使用されます。</p>
+ </div>
+ <div class="col-md-3" style="display: flex; align-items: flex-end; flex-direction: column;">
+ <input class="form-control" id="startPageUrl" placeholder="URL">
+ </div>
+ </div>
+ </div>
+ <hr>
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-9">
+ <h6>ダークテーマを使用する</h6>
+ <p class="text-muted">これらは試験的機能の一つです。ダークテーマは新しいタブ ページにのみ反映されます。</p>
+ </div>
+ <div class="col-md-3" style="display: flex; flex-direction: row-reverse;">
+ <span><input id="darkTheme" type="checkbox"></span>
+ </div>
+ </div>
+ </div>
+ <hr>
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-12">
+ <h6>カスタムテーマ</h6>
+ <table class="table table-striped table-hover" id="themeList">
+ <thead>
+ <tr>
+ <th>テーマ名</th>
+ <th>テーマ説明</th>
+ <th>テーマバージョン</th>
+ <th>テーマ製作者</th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="panel panel-default" id="engine">
+ <div class="panel-heading">検索エンジン</div>
+ <div class="panel-body">
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-9">
+ <h6>アドレスバーと<a href="my://newtab" target="_blank">新しいタブ</a> ページで使用される検索エンジン</h6>
+ </div>
+ <div class="col-md-3" style="display: flex; justify-content: space-between;">
+ <form name="searchEngines" style="width: 100%; margin-right: 10px;">
+ <select class="form-control" id="searchEngineSelect" name="searchEngineSelect">
+
+ </select>
+ </form>
+
+ <button type="button" class="btn btn-link" data-toggle="modal"
+ data-target="#searchEngineModal">
+ 検索エンジンの管理
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="panel panel-default" id="ad">
+ <div class="panel-heading">広告ブロッカー</div>
+ <div class="panel-body">
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-9">
+ <h6>広告ブロッカーを使用する</h6>
+ </div>
+ <div class="col-md-3" style="display: flex; justify-content: space-between;">
+ <span><input id="adBlocker" type="checkbox"></span>
+
+ <button type="button" class="btn btn-link" id="reloadFilters">
+ 定義ファイルのアップデート・再読み込み
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="panel panel-default" id="window">
+ <div class="panel-heading">ウィンドウ</div>
+ <div class="panel-body">
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-9">
+ <h6>カスタムタイトルバーを使用する</h6>
+ <p class="text-muted">この設定が無効の場合、OS標準のタイトルバーが使用されます。</p>
+ </div>
+ <div class="col-md-3" style="display: flex; flex-direction: row-reverse;">
+ <span><input id="customTitlebar" type="checkbox"></span>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="panel panel-default" id="about">
+ <div class="panel-heading">
+ MyBrowser について
+ <a href="" class="text-muted" id="resetLink" style="float: right;">リセット</a>
+ </div>
+ <div class="panel-body">
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-12">
+ <p><b>MyBrowser</b> は(多分)最新版です</p>
+ <p class="text-muted">バージョン: 1.4.7 (Stable) (73.0.36831.121)</p>
+ <hr>
+ <h6>MyBrowser</h6>
+ <p>Copyright 2019 Aoichaan0513. All rights reserved.</p>
+ <hr>
+ <p class="text-muted">
+ <b>MyBrowser</b> はChromiumやその他の<a href="my://credits">オープンソース
+ ソフトウェア</a>によって実現しました。
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="modal fade" id="searchEngineModal" tabindex="-1">
+ <div class="modal-dialog" style="z-index: 9999;">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal"><span>×</span></button>
+ <h4 class="modal-title">検索エンジンの管理</h4>
+ </div>
+ <div class="modal-body">
+ <table class="table table-striped table-hover" id="searchEngineList">
+ <thead>
+ <tr>
+ <th>検索エンジン名</th>
+ <th>検索URL</th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-primary" data-dismiss="modal">閉じる</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="modal fade" id="textEditorModal" tabindex="-1">
+ <div class="modal-dialog" style="z-index: 9999;">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal"><span>×</span></button>
+ <h4 class="modal-title">テキストエディタで開く (高度なユーザー用)</h4>
+ </div>
+ <div class="modal-body">
+ 現在、<b>MyBrowser</b> は開発版のため一部の設定がGUIから変更することが出来ません。<br>
+ 検索エンジンの管理を行う場合は、<a id="configPath">ここ</a>のリンクをコピーして<b>Windows標準のメモ帳以外</b>で開いてください。
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-primary" data-dismiss="modal">閉じる</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="modal fade" id="resetModal" tabindex="-1" data-backdrop="static">
+ <div class="modal-dialog" style="z-index: 9999;">
+ <div class="modal-content">
+ <div class="modal-header">
+ <h4 class="modal-title">本当に実行しますか?</h4>
+ </div>
+ <div class="modal-body">
+ 本当にデータをリセットしてよろしいですか?<br>
+ <b>続行</b> を押した場合データのリセット後アプリが再起動します。<br>
+ <hr>
+ <h6>削除されるデータ</h6>
+ <ul>
+ <li>履歴</li>
+ <li>ブックマーク (プライベート ブックマークも含む)</li>
+ <li>キャッシュ</li>
+ <li>Cookieとサイトデータ</li>
+ <ul>
+ <li>ログイン情報</li>
+ </ul>
+ </ul>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-link" data-dismiss="modal">キャンセル</button>
+ <button type="button" class="btn btn-primary" id="reset">続行</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="modal fade" id="restartModal" tabindex="-1" data-backdrop="static">
+ <div class="modal-dialog" style="z-index: 9999;">
+ <div class="modal-content">
+ <div class="modal-header">
+ <h4 class="modal-title">再起動が必要です</h4>
+ </div>
+ <div class="modal-body">
+ アプリの再起動が必要な設定が変更されました。<br>
+ 今すぐ再起動をする場合は、<b>続行</b> をクリックしてください。<br>
+ <b>キャンセル</b> をクリックした場合、次回のアプリ起動時に設定が反映されます。
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-link" data-dismiss="modal">キャンセル</button>
+ <button type="button" class="btn btn-primary" id="restart">続行</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function () {
+ $('.nav a[href="' + window.location.pathname + '"]').parent().addClass('active');
+
+ $('#configPath').prop('href', `file:///${getConfigPath()}`);
+
+ $('#homeButton').prop('checked', getHomeButton());
+
+ $('#startPageUrl').val(getStartPage());
+
+ $('#darkTheme').prop('checked', getDarkTheme());
+
+ $('#adBlocker').prop('checked', getAdBlocker());
+
+ $('#customTitlebar').prop('checked', getCustomTitlebar());
+
+ let searchEngineSelect = document.forms.searchEngines.searchEngineSelect;
+
+ getSearchEngines().forEach(function (item, i) {
+ searchEngineSelect.options[i] = new Option(item.name);
+ });
+
+ for (var i = 0; i < searchEngineSelect.options.length; i++) {
+ if (searchEngineSelect.options[i].value == getSearchEngine().name) {
+ searchEngineSelect.selectedIndex = i;
+ }
+ }
+
+ $('#homeButton').on('change', function () {
+ setHomeButton($(this).prop('checked'));
+ });
+
+ $('#startPageUrl').on('input', function () {
+ isURL($(this).val()) && setStartPage($(this).val());
+ });
+
+ $('#darkTheme').on('change', function () {
+ setDarkTheme($(this).prop('checked'));
+ });
+
+ $('#searchEngineSelect').on('change', function () {
+ const target = $('#searchEngineSelect option:selected').val();
+ setSearchEngine(target);
+ });
+ getSearchEngines().forEach(function (item, i) {
+ $('#searchEngineList').append($('<tr></tr>').append($('<td></td>').text(item.name)).append($('<td></td>').text(item.url)));
+ });
+
+ getFiles('../themes').forEach(function (item, i) {
+ const theme = getFile(item, true);
+ $('#themeList').append($('<tr></tr>').append($('<td></td>').text(theme.meta.name)).append($('<td></td>').text(theme.meta.description)).append($('<td></td>').text(theme.meta.version)).append($('<td></td>').text(theme.meta.authors)));
+ });
+
+ $('#adBlocker').on('change', function () {
+ setAdBlocker($(this).prop('checked'));
+ });
+
+ $('#customTitlebar').on('change', function () {
+ setCustomTitlebar($(this).prop('checked'));
+ $('#restartModal').modal({ backdrop: 'static', keyboard: false, show: true });
+ });
+
+ $('#reloadFilters').click(function () {
+ updateFilters();
+ });
+
+ $('#resetLink').click(function (e) {
+ e.preventDefault();
+ $('#resetModal').modal({ backdrop: 'static', keyboard: false, show: true });
+ });
+
+ $('#reset').click(function () {
+ clearBrowserData(true);
+ restart();
+ });
+
+ $('#restart').click(function () {
+ restart();
+ });
+ });
+ </script>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null
+* {
+ box-sizing: border-box;
+}
+
+body {
+ width: 100vw;
+ height: 100vh;
+ margin: 0px;
+ padding: 0px;
+
+ position: relative;
+
+ overflow: hidden;
+}
+
+select.form-control {
+ padding-left: 6px !important;
+}
+
+@media screen and (max-width: 1024px) {
+ body > header.topbar {
+ width: 100%;
+ height: 50px;
+ margin: 0px;
+ padding: 10px 15px;
+
+ display: flex;
+ align-items: center;
+
+ box-shadow: 0 0px 5px rgb(202, 202, 202);
+ background-color: white;
+ }
+
+ body > div.nav {
+ width: 240px;
+ height: 100%;
+ margin: 0px;
+ padding: 40px 50px;
+
+ position: absolute;
+ top: 0px;
+
+ transform: translateX(-102%);
+ box-shadow: 0 0px 5px rgb(202, 202, 202);
+ background-color: white;
+ }
+
+ body > div.container {
+ width: 100%;
+ height: calc(100% - 53px);
+ margin: 0px;
+ padding: 40px 50px;
+
+ position: absolute;
+ top: 53px;
+ left: 0px;
+
+ overflow-y: auto;
+ }
+
+ header.topbar .title {
+ margin: 0px;
+ display: none;
+ }
+
+ header.topbar div.nav-toggle {
+ width: 30px;
+ height: 30px;
+ margin: 0px;
+ padding: 0px;
+ margin-right: 10px;
+
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ cursor: pointer;
+
+ -webkit-user-select: none;
+
+ border: none;
+ border-radius: 2px;
+ background-color: transparent;
+ transition: 0.2s background-color;
+ }
+
+ header.topbar div.nav-toggle:hover {
+ background-color: rgba(0, 0, 0, 0.06);
+ }
+
+ header.topbar input.topbar-search {
+ background: white;
+ border: solid 1px #c1c1c1;
+ border-radius: 2px;
+ font-size: 14.5px;
+ outline: none;
+ cursor: initial;
+ width: 100%;
+ height: 100%;
+ padding: 2px 5px;
+ margin: 5px;
+ box-sizing: border-box;
+ }
+
+ header.topbar input.topbar-search:hover, header.topbar input.topbar-search:focus {
+ box-shadow: 0 5px 10px -3px rgba(0,0,0,.15), 0 0 3px rgba(0,0,0,.1);
+ transition: 0.2s;
+ }
+
+ header.topbar div.topbar-search-btn {
+ width: 60px;
+ height: 30px;
+ margin: 0px;
+ padding: 0px;
+ margin-right: 10px;
+
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ cursor: pointer;
+
+ -webkit-user-select: none;
+
+ border: none;
+ border-radius: 2px;
+ }
+
+ header.topbar div.topbar-search-btn:hover {
+ box-shadow: 0 5px 10px -3px rgba(0,0,0,.15), 0 0 3px rgba(0,0,0,.1);
+ transition: 0.2s;
+ }
+}
+@media screen and (min-width: 1024px) {
+ body > header.topbar {
+ width: 100%;
+ height: 50px;
+ margin: 0px;
+ padding: 10px 15px;
+
+ position: absolute;
+
+ display: flex;
+ align-items: center;
+
+ box-shadow: 0 0px 5px rgb(202, 202, 202);
+ background-color: white;
+ }
+
+ body > div.nav {
+ width: 240px;
+ height: calc(100% - 53px);
+ margin: 0px;
+ padding: 0px;
+
+ position: absolute;
+ top: 53px;
+ left: 0px;
+
+ border-right: solid 1px rgb(202, 202, 202);
+ }
+
+ body > div.container {
+ width: calc(100% - 240px);
+ height: calc(100% - 53px);
+ margin: 0px;
+ padding: 40px 50px;
+
+ position: absolute;
+ top: 53px;
+ left: 240px;
+
+ overflow-y: auto;
+ }
+
+ header.topbar .title {
+ margin: 0px;
+ }
+
+ header.topbar div.nav-toggle {
+ width: 30px;
+ height: 30px;
+ margin: 0px;
+ padding: 0px;
+ margin-right: 10px;
+
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ cursor: pointer;
+
+ -webkit-user-select: none;
+
+ border: none;
+ border-radius: 2px;
+ background-color: transparent;
+ transition: 0.2s background-color;
+ }
+
+ header.topbar div.nav-toggle:hover {
+ background-color: rgba(0, 0, 0, 0.06);
+ }
+
+ header.topbar input.topbar-search {
+ background: white;
+ border: solid 1px #c1c1c1;
+ border-radius: 2px;
+ font-size: 14.5px;
+ outline: none;
+ cursor: initial;
+ width: calc((100% - (40px * 5)) - 25%);
+ height: 100%;
+ padding: 2px 5px;
+ margin: 5px;
+ margin-left: 80px;
+ box-sizing: border-box;
+ }
+
+ header.topbar input.topbar-search:hover, header.topbar input.topbar-search:focus {
+ box-shadow: 0 5px 10px -3px rgba(0,0,0,.15), 0 0 3px rgba(0,0,0,.1);
+ transition: 0.2s;
+ }
+
+ header.topbar div.topbar-search-btn {
+ width: 60px;
+ height: 30px;
+ margin: 0px;
+ padding: 0px;
+ margin-right: 10px;
+
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ cursor: pointer;
+
+ -webkit-user-select: none;
+
+ border: none;
+ border-radius: 2px;
+ }
+
+ header.topbar div.topbar-search-btn:hover {
+ box-shadow: 0 5px 10px -3px rgba(0,0,0,.15), 0 0 3px rgba(0,0,0,.1);
+ transition: 0.2s;
+ }
+
+ div.nav > div.nav-item.separator {
+ padding: 0px;
+ border-bottom: solid 1px rgb(202, 202, 202);
+ }
+
+ div.nav > a.nav-item {
+ width: 100%;
+ height: auto;
+ margin: 0px;
+ padding: 8px 10px;
+
+ display: block;
+
+ font-size: 1.6rem;
+ color: #656565;
+ text-decoration: none;
+
+ display: flex;
+ -webkit-align-items: center;
+ align-items: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+ }
+
+ div.nav > a.nav-item:hover {
+ background-color: rgba(0, 0, 0, 0.06);
+ }
+
+ div.nav > a.nav-item > span {
+ width: 100%;
+ height: 100%;
+ margin: 0px;
+ margin-top: 0.5px;
+ margin-left: 8px;
+ padding: 0px;
+ }
+}
\ No newline at end of file
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>設定 | MyBrowser</title>
- <link href="my://style.css" rel="stylesheet">
- <link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/paper/bootstrap.min.css" rel="stylesheet"
- integrity="sha384-czdUt3c5InCk6AjJWW7zMMS5xcvRAyC6tWoWfXuRYfX6Vvv4Es8m8eRjzMChD493" crossorigin="anonymous">
- <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" rel="stylesheet">
- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
- <link rel="icon" sizes="any" href="my://public.svg" type="image/svg+xml">
- <link rel="mask-icon" href="my://public.svg" color="black">
+ <title>設定</title>
+ <link href="flast://style.css" type="text/css" rel="stylesheet" />
+ <script>
+ if (getDarkTheme()) {
+ document.write(
+ `<link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/darkly/bootstrap.min.css" type="text/css" rel="stylesheet" integrity="sha384-pKJMCXwCXq3HwRBt27cwwSmc0/DAo2BjRxGd7nEESEStk++p6LffHmhX9oqzVDUk" crossorigin="anonymous" />`
+ );
+ } else {
+ document.write(
+ `<link href="https://stackpath.bootstrapcdn.com/bootswatch/3.4.1/flatly/bootstrap.min.css" type="text/css" rel="stylesheet" integrity="sha384-bfWZLPtvQKHg/nZNhaO/ZW4Ba8ISud5CtEjnCTU6OR1yOq5zrrF+JP2o7om6rzLf" crossorigin="anonymous" />`
+ );
+ }
+ </script>
+ <link href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.min.css" type="text/css" rel="stylesheet" />
+ <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP|Roboto" type="text/css"
+ rel="stylesheet" />
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" type="text/css" rel="stylesheet" />
+ <link rel="icon" sizes="any" href="flast://public.svg" type="image/svg+xml">
+ <link rel="mask-icon" href="flast://public.svg" color="black">
</head>
-<body>
- <header class="topbar">
- <div class="nav-toggle">
- <i class="material-icons">
- menu
- </i>
+<body style="padding-top: 75px;">
+ <nav class="navbar navbar-default navbar-fixed-top">
+ <div class="container-fluid">
+ <div class="navbar-header">
+ <a class="navbar-brand">
+ <script>document.write(getAppName());</script></a>
+ <ul class="nav navbar-nav navbar-right">
+ <li><a href="#" data-toggle="modal" data-target="#textEditorModal">テキストエディタで開く (高度なユーザー向け)</a></li>
+ </ul>
+ </div>
</div>
- <h5 class="title">設定</h5>
-
- <button type="button" class="btn btn-link" style="margin-left: auto;" data-toggle="modal"
- data-target="#textEditorModal">
- テキストエディタで開く (高度なユーザー用)
- </button>
- </header>
- <div class="nav">
- </div>
- <div class="container">
- <div class="panel panel-default" id="design">
- <div class="panel-heading">デザイン</div>
- <div class="panel-body">
- <div class="container-fluid">
- <div class="row">
- <div class="col-md-9">
- <h6>ホームボタンを表示する</h6>
- </div>
- <div class="col-md-3" style="display: flex; align-items: flex-end; flex-direction: column;">
- <span><input id="homeButton" type="checkbox"></span>
- </div>
- </div>
- </div>
- <hr>
- <div class="container-fluid">
- <div class="row">
- <div class="col-md-9">
- <h6>起動時や<a href="my://newtab" target="_blank">新しいタブ</a> ページに使用されるサイト</h6>
- <p class="text-muted">この設定はホームボタンをクリックしたときにも使用されます。</p>
- </div>
- <div class="col-md-3" style="display: flex; align-items: flex-end; flex-direction: column;">
- <input class="form-control" id="startPageUrl" placeholder="URL">
- </div>
- </div>
- </div>
- <hr>
- <div class="container-fluid">
- <div class="row">
- <div class="col-md-9">
- <h6>ダークテーマを使用する</h6>
- <p class="text-muted">これらは試験的機能の一つです。ダークテーマは新しいタブ ページにのみ反映されます。</p>
- </div>
- <div class="col-md-3" style="display: flex; flex-direction: row-reverse;">
- <span><input id="darkTheme" type="checkbox"></span>
- </div>
- </div>
- </div>
- <hr>
- <div class="container-fluid">
- <div class="row">
- <div class="col-md-12">
- <h6>カスタムテーマ</h6>
- <table class="table table-striped table-hover" id="themeList">
- <thead>
- <tr>
- <th>テーマ名</th>
- <th>テーマ説明</th>
- <th>テーマバージョン</th>
- <th>テーマ製作者</th>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
+ </nav>
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-3">
+ <ul class="nav nav-pills nav-stacked">
+ <li>
+ <a href="flast://home/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">home</i>
+ ホーム
+ </a>
+ </li>
+ <hr>
+ <li>
+ <a href="flast://history/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">history</i>
+ 履歴
+ </a>
+ </li>
+ <li>
+ <a href="flast://downloads/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">get_app</i>
+ ダウンロード
+ </a>
+ </li>
+ <li>
+ <a href="flast://bookmarks/">
+ <i class="material-icons"
+ style="vertical-align: text-bottom; font-size: 16px;">bookmarks</i> ブックマーク
+ </a>
+ </li>
+ <li>
+ <a href="flast://store/">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">shop</i>
+ WebApp Store
+ </a>
+ </li>
+ <li class="dropdown active">
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+ <i class="material-icons" style="vertical-align: text-bottom; font-size: 16px;">settings</i>
+ 設定
+ </a>
+ <ul class="dropdown-menu" style="width: 100%;">
+ <li><a href="flast://settings/">ホーム</a></li>
+ <li class="divider"></li>
+ <li><a href="flast://settings/#design">デザイン</a></li>
+ <li><a href="flast://settings/#engine">検索エンジン</a></li>
+ <li><a href="flast://settings/#adblock">広告ブロック</a></li>
+ <li><a href="flast://settings/#window">ウィンドウ</a></li>
+ <li class="divider"></li>
+ <li><a href="flast://settings/#about">
+ <script>document.write(getAppName());</script> について</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="flast://help/">
+ <i class="material-icons"
+ style="vertical-align: text-bottom; font-size: 16px;">help_outline</i> ヘルプ
+ </a>
+ </li>
+ </ul>
+ </div>
+ <div class="col-md-9" style="padding-right: 0px;">
+ <div style="padding: 15px; overflow-y: auto; height: calc(100vh - 75px);">
+ <h3>設定</h3>
+ <hr>
+ <div class="panel panel-default" id="design">
+ <div class="panel-heading">デザイン</div>
+ <div class="panel-body">
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-9">
+ <h6>ホームボタンを表示する</h6>
+ </div>
+ <div class="col-md-3"
+ style="display: flex; align-items: flex-end; flex-direction: column;">
+ <span><input id="homeButton" type="checkbox"></span>
+ </div>
+ </div>
+ </div>
+ <hr>
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-9">
+ <h6>起動時や<a href="flast://home/" target="_blank">新しいタブ</a> ページに使用されるサイト</h6>
+ <p class="text-muted">この設定はホームボタンをクリックしたときにも使用されます。</p>
+ </div>
+ <div class="col-md-3"
+ style="display: flex; align-items: flex-end; flex-direction: column;">
+ <div class="input-group" style="width: 100%;">
+ <span class="input-group-addon"><img id="startPageIcon" /></span>
+ <input type="text" placeholder="URL" class="form-control"
+ id="startPageUrl" />
+ </div>
+ </div>
+ </div>
+ </div>
+ <hr>
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-9">
+ <h6>ダークテーマを使用する</h6>
+ <p class="text-muted">これらは試験的機能の一つです。ダークテーマは新しいタブ ページにのみ反映されます。</p>
+ </div>
+ <div class="col-md-3" style="display: flex; flex-direction: row-reverse;">
+ <span><input id="darkTheme" type="checkbox"></span>
+ </div>
+ </div>
+ </div>
+ <hr>
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-12">
+ <h6>カスタムテーマ</h6>
+ <table class="table table-striped table-hover" id="themeList">
+ <thead>
+ <tr>
+ <th>テーマ名</th>
+ <th>テーマ説明</th>
+ <th>テーマバージョン</th>
+ <th>テーマ製作者</th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
</div>
</div>
- </div>
- </div>
- </div>
- <div class="panel panel-default" id="engine">
- <div class="panel-heading">検索エンジン</div>
- <div class="panel-body">
- <div class="container-fluid">
- <div class="row">
- <div class="col-md-9">
- <h6>アドレスバーと<a href="my://newtab" target="_blank">新しいタブ</a> ページで使用される検索エンジン</h6>
+ <div class="panel panel-default" id="engine">
+ <div class="panel-heading">
+ 検索エンジン
+ <a href="" data-toggle="modal" data-target="#searchEngineModal" class="text-muted"
+ style="float: right;">検索エンジンの管理</a>
</div>
- <div class="col-md-3" style="display: flex; justify-content: space-between;">
- <form name="searchEngines" style="width: 100%; margin-right: 10px;">
- <select class="form-control" id="searchEngineSelect" name="searchEngineSelect">
-
- </select>
- </form>
+ <div class="panel-body">
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-9">
+ <h6>アドレスバーと<a href="flast://home/" target="_blank">新しいタブ</a> ページで使用される検索エンジン
+ </h6>
+ </div>
+ <div class="col-md-3" style="display: flex; justify-content: space-between;">
+ <div class="input-group" style="width: 100%;">
+ <span class="input-group-addon"><img id="searchEngineIcon" /></span>
+ <form name="searchEngines" style="width: 100%; margin-right: 10px;">
+ <select class="form-control" id="searchEngineSelect"
+ name="searchEngineSelect">
- <button type="button" class="btn btn-link" data-toggle="modal"
- data-target="#searchEngineModal">
- 検索エンジンの管理
- </button>
+ </select>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
</div>
- </div>
- </div>
- </div>
- <div class="panel panel-default" id="ad">
- <div class="panel-heading">広告ブロッカー</div>
- <div class="panel-body">
- <div class="container-fluid">
- <div class="row">
- <div class="col-md-9">
- <h6>広告ブロッカーを使用する</h6>
+ <div class="panel panel-default" id="adblock">
+ <div class="panel-heading">
+ 広告ブロック
+ <a href="#adblock" id="reloadFilters" class="text-muted"
+ style="float: right;">定義ファイルのアップデート・再読み込み</a>
</div>
- <div class="col-md-3" style="display: flex; justify-content: space-between;">
- <span><input id="adBlocker" type="checkbox"></span>
-
- <button type="button" class="btn btn-link" id="reloadFilters">
- 定義ファイルのアップデート・再読み込み
- </button>
+ <div class="panel-body">
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-9">
+ <h6>広告ブロックを使用する</h6>
+ </div>
+ <div class="col-md-3" style="display: flex; flex-direction: row-reverse;">
+ <span><input id="adBlock" type="checkbox"></span>
+ </div>
+ </div>
+ </div>
</div>
</div>
- </div>
- </div>
- </div>
- <div class="panel panel-default" id="window">
- <div class="panel-heading">ウィンドウ</div>
- <div class="panel-body">
- <div class="container-fluid">
- <div class="row">
- <div class="col-md-9">
- <h6>カスタムタイトルバーを使用する</h6>
- <p class="text-muted">この設定が無効の場合、OS標準のタイトルバーが使用されます。</p>
- </div>
- <div class="col-md-3" style="display: flex; flex-direction: row-reverse;">
- <span><input id="customTitlebar" type="checkbox"></span>
+ <div class="panel panel-default" id="window">
+ <div class="panel-heading">ウィンドウ</div>
+ <div class="panel-body">
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-9">
+ <h6>カスタムタイトルバーを使用する</h6>
+ <p class="text-muted">この設定が無効の場合、OS標準のタイトルバーが使用されます。</p>
+ </div>
+ <div class="col-md-3" style="display: flex; flex-direction: row-reverse;">
+ <span><input id="customTitlebar" type="checkbox"></span>
+ </div>
+ </div>
+ </div>
</div>
</div>
- </div>
- </div>
- </div>
- <div class="panel panel-default" id="about">
- <div class="panel-heading">
- MyBrowser について
- <a href="" class="text-muted" id="resetLink" style="float: right;">リセット</a>
- </div>
- <div class="panel-body">
- <div class="container-fluid">
- <div class="row">
- <div class="col-md-12">
- <p><b>MyBrowser</b> は(多分)最新版です</p>
- <p class="text-muted">バージョン: 1.4.7 (Stable) (73.0.36831.121)</p>
- <hr>
- <h6>MyBrowser</h6>
- <p>Copyright 2019 Aoichaan0513. All rights reserved.</p>
- <hr>
- <p class="text-muted">
- <b>MyBrowser</b> はChromiumやその他の<a href="my://credits">オープンソース
- ソフトウェア</a>によって実現しました。
- </p>
+ <div class="panel panel-default" id="about">
+ <div class="panel-heading">
+ <script>document.write(getAppName());</script> について
+ <a href="" class="text-muted" id="resetLink" style="float: right;">リセット</a>
+ </div>
+ <div class="panel-body">
+ <div class="container-fluid">
+ <div class="row">
+ <div class="col-md-12">
+ <p>
+ <b>
+ <script>document.write(getAppName());</script></b> は(多分)最新版です<br>
+ <p class="text-muted">
+ <script>document.write(getAppDescription());</script><br>
+ バージョン:
+ <script>document.write(getAppVersion());</script> (Stable)
+ (73.0.36831.121)
+ </p>
+ </p>
+ <hr>
+ <h5><b>
+ <script>document.write(getAppName());</script></b></h5>
+ <p>Copyright 2019 Aoichaan0513. All rights reserved.</p>
+ <hr>
+ <p class="text-muted">
+ <b>
+ <script>document.write(getAppName());</script></b> はChromiumやその他の<a
+ href="flast://credits/">オープンソース
+ ソフトウェア</a>によって実現しました。
+ </p>
+ </div>
+ </div>
+ </div>
</div>
</div>
</div>
<h4 class="modal-title">テキストエディタで開く (高度なユーザー用)</h4>
</div>
<div class="modal-body">
- 現在、<b>MyBrowser</b> は開発版のため一部の設定がGUIから変更することが出来ません。<br>
+ 現在、<b>
+ <script>document.write(getAppName());</script></b> は開発版のため一部の設定がGUIから変更することが出来ません。<br>
検索エンジンの管理を行う場合は、<a id="configPath">ここ</a>のリンクをコピーして<b>Windows標準のメモ帳以外</b>で開いてください。
</div>
<div class="modal-footer">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/locale/ja.js"></script>
<script type="text/javascript">
$(document).ready(function () {
- $('.nav a[href="' + window.location.pathname + '"]').parent().addClass('active');
+ $(`a[href="${window.location.href}"]`).parent().addClass('active');
$('#configPath').prop('href', `file:///${getConfigPath()}`);
$('#homeButton').prop('checked', getHomeButton());
+ $('#startPageIcon').prop('src', `http://www.google.com/s2/favicons?domain=${new URL(getStartPage()).origin}`);
$('#startPageUrl').val(getStartPage());
$('#darkTheme').prop('checked', getDarkTheme());
- $('#adBlocker').prop('checked', getAdBlocker());
+ $('#adBlock').prop('checked', getAdBlocker());
$('#customTitlebar').prop('checked', getCustomTitlebar());
for (var i = 0; i < searchEngineSelect.options.length; i++) {
if (searchEngineSelect.options[i].value == getSearchEngine().name) {
+ $('#searchEngineIcon').prop('src', `http://www.google.com/s2/favicons?domain=${new URL(getSearchEngine().url).origin}`);
searchEngineSelect.selectedIndex = i;
}
}
$('#homeButton').on('change', function () {
setHomeButton($(this).prop('checked'));
+ location.href = '#';
});
$('#startPageUrl').on('input', function () {
- isURL($(this).val()) && setStartPage($(this).val());
+ if (isURL($(this).val())) {
+ setStartPage($(this).val());
+ $('#startPageIcon').prop('src', `http://www.google.com/s2/favicons?domain=${new URL(getSearchEngine().url).origin}`);
+ }
});
$('#darkTheme').on('change', function () {
setDarkTheme($(this).prop('checked'));
+ location.href = '#';
});
$('#searchEngineSelect').on('change', function () {
const target = $('#searchEngineSelect option:selected').val();
setSearchEngine(target);
+ $('#searchEngineIcon').prop('src', `http://www.google.com/s2/favicons?domain=${new URL(getSearchEngine().url).origin}`);
});
getSearchEngines().forEach(function (item, i) {
$('#searchEngineList').append($('<tr></tr>').append($('<td></td>').text(item.name)).append($('<td></td>').text(item.url)));
$('#themeList').append($('<tr></tr>').append($('<td></td>').text(theme.meta.name)).append($('<td></td>').text(theme.meta.description)).append($('<td></td>').text(theme.meta.version)).append($('<td></td>').text(theme.meta.authors)));
});
- $('#adBlocker').on('change', function () {
+ $('#adBlock').on('change', function () {
setAdBlocker($(this).prop('checked'));
});
padding-left: 6px !important;
}
+.navbar-header {
+ width: 100%;
+}
+
+.table-style {
+ table-layout: fixed;
+ white-space: nowrap;
+}
+
+.table-style th.table-icon,
+.table-style td.table-icon {
+ width: 30px;
+ white-space: nowrap;
+}
+
+.table-style th.table-title,
+.table-style td.table-title {
+ width: 400px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+.table-style th.table-url,
+.table-style td.table-url {
+ width: calc(100% - 580px);
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+.table-style th.table-date,
+.table-style td.table-date {
+ width: 150px;
+ white-space: nowrap;
+}
+
@media screen and (max-width: 1024px) {
body > header.topbar {
width: 100%;
<head>
<meta charset="utf-8" />
- <link rel="shortcut icon" href="%PUBLIC_URL%/icon.ico" />
+ <link rel="shortcut icon" href="%PUBLIC_URL%/app/icon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="stylesheet" href="%PUBLIC_URL%/css/photon.min.css" />
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,700" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+JP" rel="stylesheet">
- <title>MyBrowser</title>
+ <title>Flast</title>
</head>
<body style="margin: 0; padding: 0; width: 100vw; height: 100vh;">
"name": "Create React App Sample",
"icons": [
{
- "src": "favicon.ico",
+ "src": "../static/app/icon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
import LightStarFilledIcon from './Resources/light/star-filled.svg';
import FeedbackIcon from './Resources/feedback.svg';
-import AccountIcon from './Resources/account.svg';
+import DarkAccountIcon from './Resources/dark/account.svg';
+import LightAccountIcon from './Resources/light/account.svg';
import DarkShieldIcon from './Resources/dark/shield.svg';
import LightShieldIcon from './Resources/light/shield.svg';
import isURL from './Utils/isURL';
+const protocolStr = 'flast';
+
const { remote, ipcRenderer, shell } = window.require('electron');
const { app, systemPreferences, Menu, MenuItem, dialog } = remote;
handleKeyDown = (e) => {
if (e.key != 'Enter' || this.state.barText.length == 0 || this.state.barText == '') return;
- if (isURL(this.state.barText)) {
+ if (isURL(this.state.barText) && !this.state.barText.includes('://')) {
+ ipcRenderer.send(`browserview-loadURL-${this.props.windowId}`, { id: this.props.index, url: `http://${this.state.barText}` });
+ } else if (!this.state.barText.includes('://')) {
+ ipcRenderer.send(`browserview-loadURL-${this.props.windowId}`, { id: this.props.index, url: this.getSearchEngine().url.replace('%s', this.state.barText) });
+ } else {
const pattern = /^(file:\/\/\S.*)\S*$/;
if (pattern.test(this.state.barText)) {
} else {
ipcRenderer.send(`browserview-loadURL-${this.props.windowId}`, { id: this.props.index, url: this.state.barText });
}
- } else {
- ipcRenderer.send(`browserview-loadURL-${this.props.windowId}`, { id: this.props.index, url: this.getSearchEngine().url.replace('%s', this.state.barText) });
}
}
{
label: '履歴',
icon: `${app.getAppPath()}/static/history.png`,
- click: () => { this.props.addTab('my://history'); }
+ click: () => { this.props.addTab(`${protocolStr}://history`); }
},
{
label: 'ダウンロード',
icon: `${app.getAppPath()}/static/download.png`,
- click: () => { this.props.addTab('my://history'); }
+ click: () => { this.props.addTab(`${protocolStr}://downloads`); }
},
{
label: 'ブックマーク',
icon: `${app.getAppPath()}/static/bookmarks.png`,
- click: () => { this.props.addTab('my://bookmarks'); }
+ click: () => { this.props.addTab(`${protocolStr}://bookmarks`); }
},
{ type: 'separator' },
{
label: '印刷',
icon: `${app.getAppPath()}/static/print.png`,
enabled: false,
- click: () => { this.props.addTab('my://settings'); }
+ click: () => { this.props.addTab(`${protocolStr}://history`); }
},
{
label: '検索',
icon: `${app.getAppPath()}/static/find.png`,
enabled: false,
- click: () => { this.props.addTab('my://help'); }
+ click: () => { this.props.addTab(`${protocolStr}://history`); }
},
{ type: 'separator' },
{
label: '設定',
icon: `${app.getAppPath()}/static/settings.png`,
- click: () => { this.props.addTab('my://settings'); }
+ click: () => { this.props.addTab(`${protocolStr}://settings`); }
},
{
label: 'ヘルプ',
icon: `${app.getAppPath()}/static/help.png`,
- click: () => { this.props.addTab('my://help'); }
+ click: () => { this.props.addTab(`${protocolStr}://help`); }
},
{ type: 'separator' },
{
});
}
+ isDarkModeOrPrivateMode = () => {
+ return config.get('design.darkTheme') || String(this.props.windowId).startsWith('private');
+ }
+
+ isDarkModeOrPrivateMode = (lightMode, darkMode) => {
+ return !(config.get('design.darkTheme') || String(this.props.windowId).startsWith('private')) ? lightMode : darkMode;
+ }
+
render() {
return (
<ContentWrapper>
- <Toolbar isPrivate={String(this.props.windowId).startsWith('private')}>
- <ToolbarButton isPrivate={String(this.props.windowId).startsWith('private')} src={this.state.canGoBack ? (!String(this.props.windowId).startsWith('private') ? LightBackIcon : DarkBackIcon) : BackInActiveIcon} size={24}
+ <Toolbar isDarkModeOrPrivateMode={config.get('design.darkTheme') || String(this.props.windowId).startsWith('private')}>
+ <ToolbarButton isDarkModeOrPrivateMode={config.get('design.darkTheme') || String(this.props.windowId).startsWith('private')} src={this.state.canGoBack ? this.isDarkModeOrPrivateMode.bind(this, LightBackIcon, DarkBackIcon) : BackInActiveIcon} size={24}
isShowing={true} isRight={false} isMarginLeft={true} isEnabled={this.state.canGoBack} title="前のページに戻る" onClick={() => { this.goBack(); }} />
- <ToolbarButton isPrivate={String(this.props.windowId).startsWith('private')} src={this.state.canGoForward ? (!String(this.props.windowId).startsWith('private') ? LightForwardIcon : DarkForwardIcon) : ForwardInActiveIcon} size={24}
+ <ToolbarButton isDarkModeOrPrivateMode={config.get('design.darkTheme') || String(this.props.windowId).startsWith('private')} src={this.state.canGoForward ? this.isDarkModeOrPrivateMode.bind(this, LightForwardIcon, DarkForwardIcon) : ForwardInActiveIcon} size={24}
isShowing={true} isRight={false} isMarginLeft={false} isEnabled={this.state.canGoForward} title="次のページに進む" onClick={() => { this.goForward(); }} />
- <ToolbarButton isPrivate={String(this.props.windowId).startsWith('private')} src={!this.state.isLoading ? (!String(this.props.windowId).startsWith('private') ? LightReloadIcon : DarkReloadIcon) : (!String(this.props.windowId).startsWith('private') ? LightCloseIcon : DarkCloseIcon)} size={24}
+ <ToolbarButton isDarkModeOrPrivateMode={config.get('design.darkTheme') || String(this.props.windowId).startsWith('private')} src={!this.state.isLoading ? this.isDarkModeOrPrivateMode.bind(this, LightReloadIcon, DarkReloadIcon) : this.isDarkModeOrPrivateMode.bind(this, LightCloseIcon, DarkCloseIcon)} size={24}
isShowing={true} isRight={false} isMarginLeft={false} isEnabled={true} title={!this.state.isLoading ? '再読み込み' : '読み込み中止'} onClick={() => { this.reload(); }} />
- <ToolbarButton isPrivate={String(this.props.windowId).startsWith('private')} src={!String(this.props.windowId).startsWith('private') ? LightHomeIcon : DarkHomeIcon} size={24}
+ <ToolbarButton isDarkModeOrPrivateMode={config.get('design.darkTheme') || String(this.props.windowId).startsWith('private')} src={this.isDarkModeOrPrivateMode.bind(this, LightHomeIcon, DarkHomeIcon)} size={24}
isShowing={config.get('design.homeButton')} isRight={false} isMarginLeft={false} isEnabled={true} title="ホームページに移動" onClick={() => { this.goHome(); }} />
- <ToolbarTextBoxWrapper isPrivate={String(this.props.windowId).startsWith('private')} buttonCount={config.get('design.homeButton') ? 6 : 5}>
- <ToolbarButton src={!String(this.props.windowId).startsWith('private') ? LightInfomationIcon : DarkInfomationIcon} size={12}
+ <ToolbarTextBoxWrapper isDarkModeOrPrivateMode={config.get('design.darkTheme') || String(this.props.windowId).startsWith('private')} buttonCount={config.get('design.homeButton') ? 6 : 5}>
+ <ToolbarButton src={this.isDarkModeOrPrivateMode.bind(this, LightInfomationIcon, DarkInfomationIcon)} size={12}
isShowing={true} isRight={false} isMarginLeft={true} isEnabled={true} title="このページの情報" />
<ToolbarTextBox value={this.state.barText} onChange={(e) => { this.setState({ barText: e.target.value }); }} onKeyDown={this.handleKeyDown} onContextMenu={this.handleContextMenu} />
<ToolbarButton data-tip={this.state.isBookmarked ? `${this.props.windowId.startsWith('private') ? 'プライベート ' : ''}ブックマークから削除しました。` : `${this.props.windowId.startsWith('private') ? 'プライベート ' : ''}ブックマークに追加しました。`} ref="markTooltip"
- isPrivate={String(this.props.windowId).startsWith('private')} src={this.state.isBookmarked ? (!String(this.props.windowId).startsWith('private') ? LightStarFilledIcon : DarkStarFilledIcon) : (!String(this.props.windowId).startsWith('private') ? LightStarIcon : DarkStarIcon)} size={12}
+ isDarkModeOrPrivateMode={config.get('design.darkTheme') || String(this.props.windowId).startsWith('private')} src={this.state.isBookmarked ? this.isDarkModeOrPrivateMode.bind(this, LightStarFilledIcon, DarkStarFilledIcon) : this.isDarkModeOrPrivateMode.bind(this, LightStarIcon, DarkStarIcon)} size={12}
isShowing={true} isRight={true} isMarginLeft={true} isEnabled={true} title={this.state.isBookmarked ? 'ブックマークから削除' : 'ブックマークに追加'} onClick={() => { this.bookMark(); }}>
<Tooltip effect="solid" place="left" event="no-event" />
</ToolbarButton>
</ToolbarTextBoxWrapper>
- <ToolbarButton isPrivate={String(this.props.windowId).startsWith('private')} src={FeedbackIcon} size={24}
+ <ToolbarButton isDarkModeOrPrivateMode={config.get('design.darkTheme') || String(this.props.windowId).startsWith('private')} src={FeedbackIcon} size={24}
isShowing={true} isRight={true} isMarginLeft={true} isEnabled={true} title="フィードバックの送信" />
- <ToolbarDivider isPrivate={String(this.props.windowId).startsWith('private')} />
- <ToolbarButton isPrivate={String(this.props.windowId).startsWith('private')} src={this.props.windowId.startsWith('private') ? (!String(this.props.windowId).startsWith('private') ? LightShieldIcon : DarkShieldIcon) : AccountIcon} size={24}
+ <ToolbarDivider isDarkModeOrPrivateMode={config.get('design.darkTheme') || String(this.props.windowId).startsWith('private')} />
+ <ToolbarButton isDarkModeOrPrivateMode={config.get('design.darkTheme') || String(this.props.windowId).startsWith('private')} src={this.props.windowId.startsWith('private') ? this.isDarkModeOrPrivateMode.bind(this, LightShieldIcon, DarkShieldIcon) : this.isDarkModeOrPrivateMode.bind(this, LightAccountIcon, DarkAccountIcon)} size={24}
isShowing={true} isRight={true} isMarginLeft={true} isEnabled={true} title={this.props.windowId.startsWith('private') ? 'プライベートモード' : process.env.USERNAME} onClick={() => { this.userMenu(); }} />
- <ToolbarButton isPrivate={String(this.props.windowId).startsWith('private')} src={!String(this.props.windowId).startsWith('private') ? LightMoreIcon : DarkMoreIcon} size={24}
+ <ToolbarButton isDarkModeOrPrivateMode={config.get('design.darkTheme') || String(this.props.windowId).startsWith('private')} src={this.isDarkModeOrPrivateMode.bind(this, LightMoreIcon, DarkMoreIcon)} size={24}
isShowing={true} isRight={true} isMarginLeft={false} isEnabled={true} title="メニュー" onClick={() => { this.moreMenu(); }} />
</Toolbar>
</ContentWrapper>
ipcRenderer.send(`browserview-get-${this.props.match.params.windowId}`, {});
if ((this.state.tabs.length - 1) > 0) {
- const id = this.state.current--;
- ipcRenderer.send(`browserview-select-${this.props.match.params.windowId}`, { id: id });
+ if (i != this.state.current) {
+ ipcRenderer.send(`browserview-select-${this.props.match.params.windowId}`, { id: this.state.current });
+ ipcRenderer.send(`browserview-get-${this.props.match.params.windowId}`, {});
+ this.setState({ current: this.state.current });
+ this.forceUpdate();
+ } else {
+ const id = this.state.current--;
+ ipcRenderer.send(`browserview-select-${this.props.match.params.windowId}`, { id: id });
+ ipcRenderer.send(`browserview-get-${this.props.match.params.windowId}`, {});
+ }
} else {
remote.getCurrentWindow().close();
}
return ((((r * 299) + (g * 587) + (b * 114)) / 1000) < 128) ? '#ffffff' : '#000000';
}
+ isDarkModeOrPrivateMode = () => {
+ return config.get('design.darkTheme') || String(this.props.match.params.windowId).startsWith('private');
+ }
+
+ isDarkModeOrPrivateMode = (lightMode, darkMode) => {
+ return !(config.get('design.darkTheme') || String(this.props.match.params.windowId).startsWith('private')) ? lightMode : darkMode;
+ }
+
closeWindow = () => {
if (this.state.tabs.length > 1) {
const dlg = dialog.showMessageBox(remote.getCurrentWindow(), {
render() {
return (
<Window isCustomTitlebar={config.get('window.isCustomTitlebar')}>
- <Titlebar color={platform.isWin32 || platform.isDarwin ? `#${systemPreferences.getAccentColor()}` : '#353535'}>
+ <Titlebar color={!String(this.props.match.params.windowId).startsWith('private') ? (platform.isWin32 || platform.isDarwin ? `#${systemPreferences.getAccentColor()}` : '#353535') : '#353535'}>
<Tabs isCustomTitlebar={config.get('window.isCustomTitlebar')}>
<TabContainer>
{this.state.tabs.map((tab, i) => {
return (
- <Tab isPrivate={String(this.props.match.params.windowId).startsWith('private')} isActive={tab.id == this.state.current} isFixed={tab.fixed} onClick={() => { ipcRenderer.send(`browserview-select-${this.props.match.params.windowId}`, { id: tab.id }); }} onContextMenu={this.handleContextMenu.bind(this, tab.id)}>
- <TabIcon src={tab.icon != undefined ? tab.icon : (!String(this.props.match.params.windowId).startsWith('private') ? LightPublicIcon : DarkPublicIcon)} width={18} height={18} />
- <TabTitle color={this.getForegroundColor(!String(this.props.match.params.windowId).startsWith('private') ? (platform.isWin32 || platform.isDarwin ? `#${systemPreferences.getAccentColor()}` : '#353535') : '#353535')} isFixed={tab.fixed} title={tab.title}>{tab.title}</TabTitle>
- <TabCloseButton isActive={tab.id == this.state.current} isFixed={tab.fixed} isRight={true} src={!String(this.props.match.params.windowId).startsWith('private') ? LightCloseIcon : DarkCloseIcon} size={14} title="このタブを閉じる" onClick={() => { this.removeTab(tab.id); }} />
+ <Tab isDarkModeOrPrivateMode={config.get('design.darkTheme') || String(this.props.match.params.windowId).startsWith('private')} isActive={tab.id == this.state.current} isFixed={tab.fixed} onClick={() => { ipcRenderer.send(`browserview-select-${this.props.match.params.windowId}`, { id: tab.id }); }} onContextMenu={this.handleContextMenu.bind(this, tab.id)}>
+ <TabIcon src={tab.icon != undefined ? tab.icon : this.isDarkModeOrPrivateMode.bind(this, LightPublicIcon, DarkPublicIcon)} width={18} height={18} />
+ <TabTitle color={this.getForegroundColor(!config.get('design.darkTheme') || !String(this.props.match.params.windowId).startsWith('private') ? (platform.isWin32 || platform.isDarwin ? `#${systemPreferences.getAccentColor()}` : '#353535') : '#353535')} isFixed={tab.fixed} title={tab.title}>{tab.title}</TabTitle>
+ <TabCloseButton isActive={tab.id == this.state.current} isFixed={tab.fixed} isRight={true} src={this.isDarkModeOrPrivateMode.bind(this, LightCloseIcon, DarkCloseIcon)} size={14} title="このタブを閉じる" onClick={() => { this.removeTab(tab.id); }} />
</Tab>
);
})}
</TabContainer>
- <TabButton isRight={true} src={!String(this.props.match.params.windowId).startsWith('private') ? LightAddIcon : DarkAddIcon} size={24} title="新しいタブを開く" onClick={() => { this.addTab(); }} />
+ <TabButton isRight={true} src={!config.get('design.darkTheme') || !String(this.props.match.params.windowId).startsWith('private') ? LightAddIcon : DarkAddIcon} size={24} title="新しいタブを開く" onClick={() => { this.addTab(); }} />
</Tabs>
<WindowButtons isCustomTitlebar={config.get('window.isCustomTitlebar')}>
<WindowButton isClose={false} title="最小化" onClick={() => { remote.getCurrentWindow().minimize(); }}>
<rect fill={this.getForegroundColor(platform.isWin32 || platform.isDarwin ? `#${systemPreferences.getAccentColor()}` : '#353535')} width="10" height="1" x="1" y="6" />
</svg>
</WindowButton>
- <WindowButton isClose={false} title={remote.getCurrentWindow().isMaximized() ? '元に戻す (縮小)' : '最大化'} onClick={() => { remote.getCurrentWindow().isMaximized() ? remote.getCurrentWindow().unmaximize() : remote.getCurrentWindow().maximize(); }}>
+ <WindowButton isClose={false} title={remote.getCurrentWindow().isMaximized() ? '元に戻す (縮小)' : '最大化'} onClick={() => { remote.getCurrentWindow().isMaximized() ? remote.getCurrentWindow().unmaximize() : remote.getCurrentWindow().maximize(); this.forceUpdate(); }}>
<svg name="TitleBarMaximize" width="12" height="12" viewBox="0 0 12 12">
- <rect stroke={this.getForegroundColor(platform.isWin32 || platform.isDarwin ? `#${systemPreferences.getAccentColor()}` : '#353535')} width="9" height="9" x="1.5" y="1.5" fill="none" />
+ <rect stroke={this.getForegroundColor(platform.isWin32 || platform.isDarwin ? `#${systemPreferences.getAccentColor()}` : '#353535')} fill="none" width="9" height="9" x="1.5" y="1.5" />
</svg>
</WindowButton>
<WindowButton isClose={true} title="閉じる" onClick={() => { this.closeWindow(); }}>
height: 100%;
padding: 6px ${paddingSize}px;
position: relative;
- background: ${props => props.isActive ? (!props.isPrivate ? '#f9f9fa' : '#353535') : 'initial'};
+ background: ${props => props.isActive ? (!props.isDarkModeOrPrivateMode ? '#f9f9fa' : '#353535') : 'initial'};
border-top: ${props => props.isActive ? `solid 2px #0a84ff` : 'solid 2px transparent'};
border-right: solid 0.5px #8b8b8b;
- color: ${props => props.isActive ? (!props.isPrivate ? 'black' : 'white') : 'white'};
+ color: ${props => props.isActive ? (!props.isDarkModeOrPrivateMode ? 'black' : 'white') : 'white'};
font-size: 11px;
overflow: hidden;
white-space: nowrap;
box-sizing: border-box;
-webkit-app-region: no-drag;
&:hover {
- background-color: ${props => !props.isActive ? 'rgba(196, 196, 196, 0.4)' : (!props.isPrivate ? '#f9f9fa' : '#353535')};
+ background-color: ${props => !props.isActive ? 'rgba(196, 196, 196, 0.4)' : (!props.isDarkModeOrPrivateMode ? '#f9f9fa' : '#353535')};
}
`;
width: 100%;
height: 40px;
display: flex;
- background: ${props => !props.isPrivate ? '#f9f9fa' : '#353535'};
- border-bottom: solid 1px #e1e1e2;
+ background: ${props => !props.isDarkModeOrPrivateMode ? '#f9f9fa' : '#353535'};
+ border-bottom: solid 1px ${props => !props.isDarkModeOrPrivateMode ? '#e1e1e1' : '#8b8b8b'};
box-sizing: border-box;
`;
box-sizing: border-box;
float: ${props => props.isRight ? 'right' : 'left'};
&:hover {
- ${props => props.isEnabled && `background-color: ${!props.isPrivate ? 'rgba(0, 0, 0, 0.06)' : 'rgba(130, 130, 130, 0.3)'};`}
+ ${props => props.isEnabled && `background-color: ${!props.isDarkModeOrPrivateMode ? 'rgba(0, 0, 0, 0.06)' : 'rgba(130, 130, 130, 0.3)'};`}
}
`;
const buttonSize = 30;
export const ToolbarTextBoxWrapper = styled.div`
- background: ${props => !props.isPrivate ? 'white' : '#252525'};
+ background: ${props => !props.isDarkModeOrPrivateMode ? 'white' : '#252525'};
border: solid 1px #c1c1c1;
border-radius: 2px;
outline: none;
- color: ${props => !props.isPrivate ? 'black' : 'white'};
+ color: ${props => !props.isDarkModeOrPrivateMode ? 'black' : 'white'};
font-size: 14.5px;
width: calc((100% - 40px * ${props => props.buttonCount}) - 25px);
height: auto;
+++ /dev/null
-<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
- <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
- <path d="M0 0h24v24H0z" fill="none"/>
-</svg>
\ No newline at end of file
+++ /dev/null
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>
\ No newline at end of file
+++ /dev/null
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/></svg>
\ No newline at end of file
+++ /dev/null
-<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
- <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
- <path d="M0 0h24v24H0z" fill="none"/>
-</svg>
\ No newline at end of file
--- /dev/null
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
\ No newline at end of file
+++ /dev/null
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
\ No newline at end of file
+++ /dev/null
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>
\ No newline at end of file
+++ /dev/null
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>
\ No newline at end of file
+++ /dev/null
-<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
- <path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/>
- <path d="M0 0h24v24H0z" fill="none"/>
-</svg>
\ No newline at end of file
+++ /dev/null
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
\ No newline at end of file
+++ /dev/null
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
\ No newline at end of file
+++ /dev/null
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
\ No newline at end of file
export default (input) => {
- const pattern = /^((?:\w+:)?\/\/([^\s.]+\.\S{2}|localhost[:?\d]*)|my:\/\/\S.*|file:\/\/\S.*)\S*$/;
+ const pattern = /^((?:\w+:)?\/\/([^\s.]+\.\S{2}|localhost[:?\d]*)|flast:\/\/\S.*|file:\/\/\S.*)\S*$/;
if (pattern.test(input)) {
return true;
'ext': 'html'
}
],
- 'nsis': {
- 'installerIcon': './static/icon.ico',
- 'uninstallerIcon': './static/icon.ico'
- },
'linux': {
'category': 'Network',
'target': [
'arch': ['ia32', 'x64']
}
],
- 'icon': './static/icon.ico',
},
},
});
\ No newline at end of file
'productName': packageJson.name,
'copyright': `Copyright 2019 ${packageJson.author.name}. All rights reserved.`,
'asar': true,
+ 'files': ['app/*', 'static/*'],
'fileAssociations': [
{
'name': 'Document',
'productName': packageJson.name,
'copyright': `Copyright 2019 ${packageJson.author.name}. All rights reserved.`,
'asar': true,
+ 'directories': {
+ 'output': 'dist',
+ 'buildResources': 'static'
+ },
'fileAssociations': [
{
'name': 'Document',
{
- "name": "MyBrowser",
+ "name": "Flast",
"description": "Cross-platform browser based on Chromium.",
- "version": "1.5.2",
+ "version": "1.5.6",
"private": true,
"author": {
"name": "Aoichaan0513",
},
"dependencies": {},
"scripts": {
- "electron:dev": "electron .",
"package:win": "node build-win",
"package:mac": "node build-mac",
"package:linux": "node build-linux"
},
"devDependencies": {
- "electron": "^5.0.1",
- "electron-builder": "^20.40.2",
- "electron-packager": "^13.1.1",
- "typescript": "^3.4.5"
+ "electron-builder": "20.40.2"
}
-}
\ No newline at end of file
+}