miniBB Support Forums | 15 years on The Web
miniBB ®


 | Forums | Register | Reply | Search | Statistics | Manual |
Suggestions miniBB Support Forums / Suggestions /   

Avoiding [youtube=null] on cancel?

Author tom322
Active Member
#1 | Posted: 9 Oct 2014 22:13 | Edited by: tom322 
Currently the Youtube video Javascript prompt looks like:

<a href="JavaScript:paste_strinL(selektion,4,'[youtube='+prompt('YouTube%20movie%20URL:','')+']','','')" onmousemove="pasteSel()"><img src="" style="width:23px;height:22px" alt="" title="Insert YouTube video"></a>

A small 'issue' is that after clicking on the Cancel button, the following is still pasted into the form:


It seems the code is almost the same as for the URL, so I'm not sure it behaves differently with the youtube link.. Ideally, there should be nothing pasted when user clicks on the Cancel button.

Author Paul
Lead Developer
#2 | Posted: 10 Oct 2014 16:29 
Here's the exact code:

if(bbCode1=='[youtube=null]') { bbCode1=''; bbCode2=''; myValue=''; }

You need to put it before the line saying


of templates/form.js -> function insertAtCursor.

If you confirm it works on your end, I could add it to the TODO list for YouTube add-on for the future.

Author tom322
Active Member
#3 | Posted: 10 Oct 2014 16:57 
Thank you Paul, will be testing today and post the results here.

Author tom322
Active Member
#4 | Posted: 10 Oct 2014 18:51 
I can confirm the change works correctly, thank you!

Suggestions miniBB Support Forums / Suggestions /
 Avoiding [youtube=null] on cancel?
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message

You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.

Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.