Skip to content

Commit

Permalink
Local parser + local screenshots support
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustem Mussabekov committed Nov 20, 2019
1 parent 325e250 commit 62cf656
Show file tree
Hide file tree
Showing 23 changed files with 1,103 additions and 5,874 deletions.
8 changes: 7 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"presets": ["es2015-minimal", "stage-0", "react"],
"presets": ["es2015", "stage-0", "react"],
"plugins": [
["transform-runtime", {
"regenerator": true
}]
],
"env": {
"production": {
"plugins": [
"lodash",
"babel-plugin-transform-remove-console",
"babel-plugin-transform-remove-debugger"
]
Expand Down
5 changes: 2 additions & 3 deletions internals/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ var SplitByPathPlugin = require('webpack-split-by-path');
var CopyWebpackPlugin = require('copy-webpack-plugin');

var copyFilesList = [
{ from: './background/opera/panel.html', to: 'panel.html' },
{ from: './background/inject/inject.css', to: 'inject.css' }
{ from: './background/opera/panel.html', to: 'panel.html' }
]

if (global.withAppBuild){
Expand Down Expand Up @@ -84,7 +83,7 @@ const Common = {
cacheDirectory: path.join(__dirname, "../temp"),
presets: ['react', "stage-0", 'es2015-minimal']
},*/
exclude: /node_modules/
exclude: /node_modules\/(?!(normalize-url)\/).*/
},
'svg': {
test: /.*\.svg$/,
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@
"babel-cli": "6.x",
"babel-core": "6.x",
"babel-loader": "6.x",
"babel-plugin-lodash": "3",
"babel-plugin-react-transform": "2.x",
"babel-plugin-transform-remove-console": "6.x",
"babel-plugin-transform-remove-debugger": "6.x",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "1.7.x",
"babel-preset-es2015": "6.x",
"babel-preset-es2015-minimal": "^2.1.0",
"babel-preset-react": "6.x",
Expand Down Expand Up @@ -66,6 +69,7 @@
"history": "^4.4.0",
"jquery": "^3.1.1",
"lodash": "^4.17.2",
"normalize-url": "^4.5.0",
"object-hash": "^1.1.5",
"rc-css-transition-group": "^2.1.4",
"react": "^15.4.0",
Expand Down
13 changes: 9 additions & 4 deletions pages/mini/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ var sendMessageToIframe = function(m) {
document.getElementById("iframe").contentWindow.postMessage(m,'*');
}

var sendMessageToBackground = function(data, callback) {
if (typeof webextension.runtime != "undefined"){
webextension.runtime.sendMessage(data, callback)
}
}

var onMessage = function(e) {
//if (e.origin!="https://raindrop.io")
// return;
Expand All @@ -28,9 +34,7 @@ var onMessage = function(e) {
break;

case "setButtonStatus":
if (typeof webextension.runtime != "undefined"){
webextension.runtime.sendMessage(Object.assign({}, e.data, {action: "setStatus"}), function(){});
}
sendMessageToBackground(Object.assign({}, e.data, {action: "setStatus"}), function(){});
break;

case "openTab":
Expand All @@ -44,8 +48,9 @@ window.removeEventListener("message", onMessage, false);
window.addEventListener("message", onMessage, false);


//tabs permission
window.onload = function() {
sendMessageToBackground({action: "appStarted"}, function(){})
//tabs permission
webextension.permissions.contains({permissions: ['tabs']}, function(result) {
if (result){
localStorage.setItem('tabs-permissions-ignore', '1')
Expand Down
3 changes: 2 additions & 1 deletion src/actions/bookmark.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export default Reflux.createActions([
'loadId',
'remove',
'restore',
'update'
'update',
'uploadCover'
]);
4 changes: 0 additions & 4 deletions src/background/bridge/jquery.js

This file was deleted.

Loading

0 comments on commit 62cf656

Please sign in to comment.