aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'view/js/main.js')
-rw-r--r--view/js/main.js37
1 files changed, 36 insertions, 1 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 8ee676f0d..eb8c78ef4 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -118,6 +118,34 @@
return true;
}
+ function insertCommentURL(comment,id) {
+
+ reply = prompt(aStr['linkurl']);
+ if(reply && reply.length) {
+ reply = bin2hex(reply);
+ $('body').css('cursor', 'wait');
+ $.get('parse_url?binurl=' + reply, function(data) {
+ var tmpStr = $("#comment-edit-text-" + id).val();
+ if(tmpStr == comment) {
+ tmpStr = "";
+ $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
+ $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
+ openMenu("comment-tools-" + id);
+ $("#comment-edit-text-" + id).val(tmpStr);
+ }
+
+ textarea = document.getElementById("comment-edit-text-" +id);
+ textarea.value = textarea.value + data;
+ $('body').css('cursor', 'auto');
+
+ });
+ }
+ return true;
+ }
+
+
+
+
function viewsrc(id) {
$.colorbox({href: 'viewsrc/' + id, maxWidth: '80%', maxHeight: '80%' });
}
@@ -1113,7 +1141,7 @@ Array.prototype.remove = function(item) {
function previewTheme(elm) {
theme = $(elm).val();
$.getJSON('pretheme?f=&theme=' + theme,function(data) {
- $('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><div id="theme-version">' + data.version + '</div><div id="theme-credits">' + data.credits + '</div><a href="' + data.img + '"><img src="' + data.img + '" width="320" height="240" alt="' + theme + '" /></a>');
+ $('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><div id="theme-version">' + data.version + '</div><div id="theme-credits">' + data.credits + '</div><a href="' + data.img + '"><img src="' + data.img + '" style="max-width:100%; max-height:300px" alt="' + theme + '" /></a>');
});
}
@@ -1230,6 +1258,13 @@ function chanviewFull() {
addeditortext(data);
}
+
+ function loadText(textRegion,data) {
+ var currentText = $(textRegion).val();
+ $(textRegion).val(currentText + data);
+ }
+
+
function addeditortext(data) {
if(plaintext == 'none') {
var currentText = $("#profile-jot-text").val();