Comments (3)
try this way
onclick="videoplay(${JSON.stringify(entry.n)})"
from hfs.
Now it gets passed empty string i think
Uncaught SyntaxError: Invalid or unexpected token (at (index):1:11)
videoplay()
Only on files with single quotes in the name.
from hfs.
well, i experimented a bit, and the correct way should be
`<button onclick='videoplay(${JSON.stringify(entry.n).replace(/'/g, ''')})'>+</button>`
Please confirm it works for you.
It is rather complicated, I know, so I decided that from next version you'll be able to do this
HFS.onEvent('afterEntryName', ({ entry }, { _ }) =>
`<button onclick='videoplay("${_.escape(entry.n)}")'>+</button>`)
Anyway, this problem is due to the fact that we are trying to produce correct HTML.
The plugin can generate content as HTML, but also with pure javascript or React.
In fact, my simple-player plugin has no such problem, as it works with react
h('button',{ className: 'play-button', onClick: () => play(entry.n) }))
from hfs.
Related Issues (20)
- "Missing permission" if allowed to see but not download HOT 1
- files/folders with "\" in the name cannot be interracted with HOT 2
- Node.js service crashes HOT 2
- HFS will not load under reverse proxy
- "stop" and "exit" should be aliases of "quit" HOT 2
- Setting Sytem Integration on Linux throws an error HOT 1
- index.html is considered as download (max downloads per ip conflict)
- Black screen issue on the Shared Files page HOT 1
- popup after saving a comment is "fullscreen" and not small
- "select all" box stays checked after deleting files HOT 2
- a security issue report when do a scan via https://www.virustotal.com/ HOT 1
- Linux arm support for rasberrypi and ubuntu vm alternatives HOT 1
- Prevent Windows from sleep HOT 1
- Access to content using a certificate HOT 13
- remove system integration HOT 2
- crash (i think memory leak?) HOT 1
- Running HFS as non-root HOT 2
- the plugin list does not load HOT 9
- If it's possible to add "copy / link" in addition to "cut"? HOT 7
- Folder structure gets messed up on drag&drop upload HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hfs.