attachment preview: add destroy method to linkPreview.js
This commit is contained in:
parent
132e0b83c4
commit
b065356c28
1 changed files with 21 additions and 1 deletions
|
@ -412,6 +412,23 @@
|
|||
});
|
||||
};
|
||||
|
||||
var destroy = function() {
|
||||
$('#' + selector).unbind();
|
||||
$('#preview_' + selector).remove();
|
||||
binurl;
|
||||
block = false;
|
||||
blockTitle = false;
|
||||
blockDescription = false;
|
||||
cache = {};
|
||||
images = "";
|
||||
isExtern = false;
|
||||
photoNumber = 0;
|
||||
firstPosted = false;
|
||||
isActive = false;
|
||||
isCrawling = false;
|
||||
selector = "";
|
||||
};
|
||||
|
||||
var trim = function(str) {
|
||||
return str.replace(/^\s+|\s+$/g, "");
|
||||
};
|
||||
|
@ -433,6 +450,9 @@
|
|||
// make crawlText() accessable from the outside.
|
||||
crawlText: function(text) {
|
||||
crawlText(text);
|
||||
},
|
||||
destroy: function() {
|
||||
destroy();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue