This commit is contained in:
8chan 2015-03-10 23:42:57 +00:00
commit a6191d0172
3 changed files with 14 additions and 24 deletions

View File

@ -14,17 +14,13 @@
var tab = Options.add_tab("user-css", "css3", _("User CSS")); var tab = Options.add_tab("user-css", "css3", _("User CSS"));
var textarea = $("<textarea></textarea>").css({ var textarea = $("<textarea></textarea>").css({
"font-size": 12, "height" : "85%",
position: "absolute", "width" : "100%",
top: 35, bottom: 35, "font-size" : "9pt",
width: "calc(100% - 20px)", margin: 0, padding: "4px", border: "1px solid black", "font-family": "monospace",
left: 5, right: 5
}).appendTo(tab.content); }).appendTo(tab.content);
var submit = $("<input type='button' value='"+_("Update custom CSS")+"'>").css({ var submit = $("<input type='button' value='"+_("Save custom CSS")+"'>").css({
position: "absolute", "width": "100%",
height: 25, bottom: 5,
width: "calc(100% - 10px)",
left: 5, right: 5
}).click(function() { }).click(function() {
localStorage.user_css = textarea.val(); localStorage.user_css = textarea.val();
apply_css(); apply_css();

View File

@ -14,17 +14,13 @@
var tab = Options.add_tab("user-js", "code", _("User JS")); var tab = Options.add_tab("user-js", "code", _("User JS"));
var textarea = $("<textarea></textarea>").css({ var textarea = $("<textarea></textarea>").css({
"font-size": 12, "height" : "85%",
position: "absolute", "width" : "100%",
top: 35, bottom: 35, "font-size" : "9pt",
width: "calc(100% - 20px)", margin: 0, padding: "4px", border: "1px solid black", "font-family": "monospace",
left: 5, right: 5
}).appendTo(tab.content); }).appendTo(tab.content);
var submit = $("<input type='button' value='"+_("Update custom Javascript")+"'>").css({ var submit = $("<input type='button' value='"+_("Save custom Javascript")+"'>").css({
position: "absolute", "width": "100%",
height: 25, bottom: 5,
width: "calc(100% - 10px)",
left: 5, right: 5
}).click(function() { }).click(function() {
localStorage.user_js = textarea.val(); localStorage.user_js = textarea.val();
document.location.reload(); document.location.reload();

View File

@ -77,10 +77,8 @@ onready(function(){
.appendTo(link.closest('div.post')); .appendTo(link.closest('div.post'));
// shrink expanded images // shrink expanded images
newPost.find('div.file a[data-expanded="true"]').each(function() { newPost.find('div.file img.post-image').css({'display': '', 'opacity': ''});
var thumb = $(this).find('img.post-image').attr('src'); newPost.find('div.file img.full-image').remove();
$(this).find('img.full-image').attr('src', thumb);
});
// Highlight references to the current post // Highlight references to the current post
if (link.hasClass('mentioned-'+id)) { if (link.hasClass('mentioned-'+id)) {