function addToModal(url) {
- var url = url + '?mode=modal';
+ var char = qOrAmp(url);
+
+ var url = url + char + 'mode=modal';
var modal = $('#modal').modal();
modal
return rnd;
}
+// Does we need a ? or a & to append values to a url
+function qOrAmp(url) {
+ if(url.search('\\?') < 0) {
+ return '?';
+ } else {
+ return '&';
+ }
+}
+
function insertFormatting(comment,BBcode,id) {
var tmpStr = $("#comment-edit-text-" + id).val();