| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Chrome Extension to display XML files built with Vue
Supports both CSS and XPath selectors.
Supports text search and Regular Expression search.
Both querySelectorAll and jQuery flavors of CSS selectors are available.
RegEx is the only CASE-INSENSITIVE one.
Highly optimized for large XML files ( > 1MB ).
Stand-alone version - extremely fast because of avoiding Chrome's slow loading process.
Global x variable (window.x) is available in DevTools which includes:
Above helpers are (expression, baseElement = root) => [] and searching on baseElement which is x.root by default.
yarn website or npm run website
AdvancedTarget folder is public
You can also pass PROXY env variable to enable proxy. For example,
PROXY="https://my.proxy/get?url=" yarn websiteWhen fetching https://foo.bar/baz.xml, it will get https://my.proxy/get?url=https%3A%2F%2Ffoo.bar%2Fbaz.xml instead. You can implement your own proxy with CORS.
There is an example for webtask:
const zlib = require('zlib');
const fetch = require('node-fetch'); // 3rd-party
module.exports = async (context, req, res) => {
const { url } = context.query;
if (!url) {
res.writeHead(400, { 'Content-Type': 'text/plain'});
res.end('Required query string `url`');
return;
}
try {
const response = await fetch(url);
const { headers } = response;
Array.from(headers.keys()).forEach((key) => {
if (key === 'content-type') {
res.setHeader('Content-Type', headers.get(key));
}
});
res.writeHead(response.status, {
'Access-Control-Allow-Origin': '*', // IMPORTANT: enables CORS. You can restrict it to your own domain names.
'Content-Encoding': 'deflate',
'Cache-Control': 'max-age=3600',
});
zlib.deflate(await response.buffer(), (err, buff) => {
if (err) throw err;
res.end(buff);
});
} catch (err) {
res.writeHead(500, { 'Content-Type': 'text/plain' });
res.end(err.message);
}
};Since Extension X needs more time to render the page, I put some extra code to calculate real time. The code is something like:
```js
document.addEventListener('readystatechange', function() {
console.time('ready');
// ... main code
});
// Inside another function
function xxx() {
sendMessage(..., function () {
// ...
sendMessage(..., function () {
// ... it will generate DOM here
setTimeout(() => {
console.timeEnd('ready');
}, 0);
});
});
}
```
Round 1: 2MiB XML file (Total 41248 nodes; Max Depth: 5)
Round 2: 5.2MiB XML file (Total 113126 nodes; Max Depth: 4)
Round 3: 14.4MiB XML file (Total 307067 nodes; Max Depth: 4)
Windows 10 1803 x64
Intel i7-6700K
32G RAM
Chrome v71.0.3578.98 x64
| Back | FazBrowse Home | New Git URL |