You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sorry for taking so long with my answer. Theoretically, you could use an <iframe> to display the share dialogue in-page. However, I don't know if this would work properly. AFAIK, many browsers block 3rd-party <iframe>s, and some website providers don't allow such embedding because of strict Cross-Origin policies. Heck, even opening pop-ups in new windows (instead of the new tabs) is now considered bad :(
You could experiment with it, of course. Shareon doesn't offer customizing listeners and link hrefs. You could load and initialize Shareon, and then convert listeners to something new. For example:
<divclass="shareon"><aclass="twitter"></a></div>
// TODO: import Shareon// TODO: initialize Shareonfor(constcontainerofquerySelectorAll('.shareon')){for(constbuttonofcontainer.children){consturl=button.getAttribute("href");button.setAttribute("href","#");button.addEventListener("click",function(){// open <iframe> with url})}}
kytta
changed the title
question: opening share content inline instead of new window/tab?
Opening share content inline instead of new window/tab?
Feb 11, 2022
hello nick
we like your plugin and are considering working with it. could you please share your opinion on the following:
current shareon behaviour
desired shareon behaviour
is this impossible/restricted by CORS policies or other technical reasons?
thank you
ps.: i understand that is currently not part of shareon's features, just asking if you think this could be possible.
The text was updated successfully, but these errors were encountered: