mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-20 02:31:23 +00:00
export pdf local ok
This commit is contained in:
17
node_modules/leanote_protocol.js
generated
vendored
17
node_modules/leanote_protocol.js
generated
vendored
@@ -25,7 +25,21 @@ var leanoteProtocol = {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
// js, 请求, 导出pdf
|
||||
// leanote://public/a.js
|
||||
console.log(url);
|
||||
var prefix = 'leanote://public';
|
||||
// leanote://public/libs/MathJax/MathJax.js?config=TeX-AMS_HTML Failed to load resource: net::ERR_FILE_NOT_FOUND
|
||||
if (url.substr(0, prefix.length) == prefix) {
|
||||
var path = process.cwd() + url.substr('leanote:/'.length);
|
||||
if (path.indexOf('?') >= 0) {
|
||||
path = path.substr(0, path.indexOf('?'));
|
||||
}
|
||||
callback({path: path});
|
||||
}
|
||||
}
|
||||
// var url = request.url.substr(7);
|
||||
// callback({path: '/Users/life/Desktop/newicon/blog@2x.png'});
|
||||
@@ -37,6 +51,7 @@ var leanoteProtocol = {
|
||||
});
|
||||
// });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = leanoteProtocol;
|
||||
|
Reference in New Issue
Block a user