# HG changeset patch # User edogawaconan # Date 1381856123 -32400 # Node ID a9c45375a65655cafdacd85ae06ed9fbcc5d2a06 # Parent 45bd94c708968170a0717fe09b16500e340ed66c Nuke width adjuster from orbit. diff -r 45bd94c70896 -r a9c45375a656 app/assets/javascripts/boot.js --- a/app/assets/javascripts/boot.js Tue Oct 15 22:42:24 2013 +0900 +++ b/app/assets/javascripts/boot.js Wed Oct 16 01:55:23 2013 +0900 @@ -1,13 +1,11 @@ //= require zp.init //= require zp.emul_radio //= require zp.formatter -//= require zp.viewer_width //= require zp.hash_magic //= require zp.new $(document).ready(function() { zp.emul_radio.init() zp.formatter.init() - zp.viewer_width.init() zp.hash_magic.init() zp.new.init() }) diff -r 45bd94c70896 -r a9c45375a656 app/assets/javascripts/zp.hash_magic.js --- a/app/assets/javascripts/zp.hash_magic.js Tue Oct 15 22:42:24 2013 +0900 +++ b/app/assets/javascripts/zp.hash_magic.js Wed Oct 16 01:55:23 2013 +0900 @@ -1,31 +1,22 @@ //= require zp.formatter -//= require zp.viewer_width (function($) { window.zp.hash_magic = { load_hash: function() { - var hash_array = window.location.hash.slice(2).split(".") - format = hash_array[0] - width = hash_array[1] + var format = window.location.hash.slice(1) if (format !== undefined) { zp.formatter.links().filter("[href=#" + format + "]").click() } - if (width !== undefined) { - zp.viewer_width.resize(width) - } }, set_hash: function(e) { if (typeof e !== "undefined") { - if (zp.formatter.links().filter(e.target).length === 0 && - zp.viewer_width.links().filter(e.target).length === 0) { return } + if (zp.formatter.links().filter(e.target).length === 0) return else e.preventDefault() } var format = zp.formatter.current(), - width = zp.viewer_width.current, - hash = "#!" + hash = "#" hash += format - if (width !== "auto") { hash += "." + width } - if (hash === "#!pl") { hash = " " } + if (hash === "#pl") { hash = " " } history.replaceState(null, "", hash) }, init: function() { diff -r 45bd94c70896 -r a9c45375a656 app/assets/javascripts/zp.viewer_width.js --- a/app/assets/javascripts/zp.viewer_width.js Tue Oct 15 22:42:24 2013 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -(function($) { - window.zp.viewer_width = { - links: function() { return $("#paste-resize ul li a") }, - current: "auto", - resize: function(width) { - var - paste = $("#paste"), - title = $("#paste-resize .btn") - title_span = $("#width-text") - title_span.text(title.data("base").replace(":size:", width)) - this.current = width - if (width == "auto") { - paste.css("width", "") - } else { - paste.css("width", width) - } - zp.hash_magic.set_hash() - }, - do_switch: function(e) { - this.resize($(e.target).text()) - }, - init: function() { - this.links().click($.proxy(this.do_switch, this)) - } - } -})(jQuery) diff -r 45bd94c70896 -r a9c45375a656 app/assets/stylesheets/pastes.css --- a/app/assets/stylesheets/pastes.css Tue Oct 15 22:42:24 2013 +0900 +++ b/app/assets/stylesheets/pastes.css Wed Oct 16 01:55:23 2013 +0900 @@ -9,7 +9,3 @@ #pl > pre { word-break: normal; } - -.row { - margin-bottom: 20px; -} diff -r 45bd94c70896 -r a9c45375a656 app/views/pastes/show.html.erb --- a/app/views/pastes/show.html.erb Tue Oct 15 22:42:24 2013 +0900 +++ b/app/views/pastes/show.html.erb Wed Oct 16 01:55:23 2013 +0900 @@ -18,18 +18,6 @@ <%= link_to 'Highlight', '#hl', :data => { :toggle => 'tab' }, :class => 'btn btn-default' %> <%= link_to 'Markdown', '#md', :data => { :toggle => 'tab' }, :class => 'btn btn-default' %> -
- - Width: auto - - - -