mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-29 06:51:11 -05:00
embeddable pastes - the js part
This commit is contained in:
parent
ef7724b32f
commit
d86ce778a2
@ -4,6 +4,7 @@ ST.init = function() {
|
|||||||
ST.change();
|
ST.change();
|
||||||
ST.show();
|
ST.show();
|
||||||
ST.expand();
|
ST.expand();
|
||||||
|
ST.show_embed();
|
||||||
};
|
};
|
||||||
|
|
||||||
ST.change = function() {
|
ST.change = function() {
|
||||||
@ -21,6 +22,18 @@ ST.show = function() {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ST.show_embed = function() {
|
||||||
|
$embed_field = $('#embed_field');
|
||||||
|
$embed_field.hide();
|
||||||
|
$embed_field.after('<a id="show_code" href="#">Show code</a>');
|
||||||
|
$('#show_code').live('click',
|
||||||
|
function() {
|
||||||
|
$(this).hide();
|
||||||
|
$embed_field.show().select();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
ST.expand = function() {
|
ST.expand = function() {
|
||||||
$('.expand').click(function() {
|
$('.expand').click(function() {
|
||||||
if ($('.paste').hasClass('full')) {
|
if ($('.paste').hasClass('full')) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user