-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpbb.js
More file actions
54 lines (50 loc) · 1.42 KB
/
Copy pathphpbb.js
File metadata and controls
54 lines (50 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
(function() {
var plugin = function($) {
$(document).ready(function(){
$.urlMakerOnLoad = function() {
$('input[name=addbbcode14]')
.clone()
.attr('name', 'urlmaker')
.attr('value', 'Upload Img')
.removeAttr('accesskey')
.removeAttr('onclick')
.removeAttr('onmouseover')
.unbind('click')
.unbind('hover')
.css({width: '70px'})
.insertAfter('input[name=addbbcode14]');
$('textarea[name=message]').urlMaker(
{
bindTo: 'input[name=urlmaker]',
codeType: 'bbcode-choice',
previewResize: 200
}
);
}
$('<script src="http://urlmaker.net/api/urlmaker.jquery.js"></script>').appendTo('body');
});
};
if (typeof jQuery == 'undefined') {
function getJQueryScript(url)
{
var script = document.createElement('script');
script.setAttribute('type', 'text/javascript');
script.setAttribute('src', url);
var head = document.getElementsByTagName('head')[0], done = false;
head.appendChild(script);
// Attach handlers for all browsers
script.onload = script.onreadystatechange = function() {
if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
done = true;
plugin(jQuery);
script.onload = script.onreadystatechange = null;
head.removeChild(script);
};
};
head.appendChild(script);
};
getJQueryScript('http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js');
} else {
plugin(jQuery);
}
}());