Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom attribute #6

Open
chadul opened this issue Jul 24, 2018 · 3 comments
Open

Custom attribute #6

chadul opened this issue Jul 24, 2018 · 3 comments

Comments

@chadul
Copy link

chadul commented Jul 24, 2018

Is possible to use custom attribute of sound file links i.e instead

I don't want mobile user can see the link through "long touch"

@zirafa
Copy link
Owner

zirafa commented Jul 25, 2018

Whoops, I think Github's markdown ate your comment...but if I understand correctly you'd like to do:

<a dataUrl="sound.mp3">

instead of

<a href="sound.mp3">

At the moment the script only assumes the data is in the href. However, it shouldn't be too hard to modify the code to use a data-url attribute in combination with the pt-playable class, something like:

<a class="pt-playable" data-pushtape-url="sound.mp3" href="">

As a proof of concept, you could try replacing references to o.href in the pushtape-player.js script with o.getAttribute('data-pushtape-url'). Let me know if this works -- I'd be interested in adding this functionality if so.

@chadul chadul closed this as completed Jul 29, 2018
@zirafa
Copy link
Owner

zirafa commented Jul 30, 2018

@chadul, curious why you closed this? Did you try the solution as suggested?

@zirafa zirafa reopened this Jul 30, 2018
@chadul
Copy link
Author

chadul commented Jul 30, 2018

I have tried all above you mentioned but not working, currently I use jQuery to prevent "long touch" or "right click" of "href" links in ul.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants