mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-16 18:49:50 +00:00
interim commit
This commit is contained in:
18
src/index.js
Normal file
18
src/index.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import './style';
|
||||
import './lib/fix-pmc';
|
||||
import App from './components/app';
|
||||
|
||||
export default App;
|
||||
|
||||
if (typeof window!=='undefined') {
|
||||
addEventListener('click', e => {
|
||||
let { target } = e;
|
||||
do {
|
||||
if (target.nodeName === 'A') {
|
||||
history.pushState(null, null, target.pathname);
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
} while (target = target.parentNode);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user