Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xcv58 authored Feb 19, 2023
1 parent 59d2121 commit bbc959f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,21 @@ http://ryanmorr.com/using-mutation-observers-to-watch-for-element-availability/

Special thanks to [Ryan Morr](http://ryanmorr.com/)

## How do I inject large JavaScript

You can host the JS code in public accessible url and dynamically load and eval it. A sample implementation like this:

```
customjsReady('body', function(element) {
fetch('https://gist.githubusercontent.com/xcv58/5aaeda690ace2f468d51dbf9c65a3980/raw/a8b1c59223892fb2be08490b00c84fa4a029bb8e/test.js')
.then((res) => res.text())
.then((js) => {
console.log('works in fetch', js)
eval(js);
})
});
```

# Why Custom JavaScript for Websites 2
Since the author haven't update original extension for almost one year.
Its website http://hromadadan.com is also unavailable.
Expand Down

2 comments on commit bbc959f

@illtellyoulater
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PLEASE FIX THE BUGS IN THE CODE BEFORE ADDING NEW FEATURES...

In README you say you've created this version because the original author did not maintain is version for 1 year.
Now you have not updated this for like 3 years... despite the many issues reported here and on the google extension page.
It does not much much sense, I am not trying to be rude... I'm just saying...

In my case I found that for some reason the CSS code is added as JS, causing Syntax Error in the browser console.
Of course I checked I am saving the code as CSS by selecting "CSS" from the extension code editor drop down menu, but despite this it will be still saved as JS, causing the following error:

SyntaxError: Unexpected token '.' (at data:text/javascript;base64,Lnl0cC1wYXVzZS1vdmVybGF5LWNvbnRhaW5lciwgLnl0cC1wYXVzZS1vdmVybGF5IHsgCiAgZGlzcGxheTogbm9uZSFpbXBvcnRhbnQKfQ==:1:1)

I hope you can fix this soon, if you need any other info from me just let me know, thanks!

@xcv58
Copy link
Owner Author

@xcv58 xcv58 commented on bbc959f May 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last update is February 20, 2023 which is 3 months ago.

Please sign in to comment.