// ==UserScript== // @name Move Tab Half Step Ahead // @namespace http://www.xuldev.org/ // @description Change the position whereto move a tab by drag-and-drop half step ahead. // @include main // @compatibility Firefox 17.0 // @author Gomita // @version 1.0.20130601 // @homepage http://www.xuldev.org/misc/ucjs.php // ==/UserScript== (function() { var func = gBrowser.mTabContainer._getDropIndex.toString(); func = func.replace( "tabs[i].boxObject.width / 2", "tabs[i].boxObject.width" ); func = func.replace( "return i;", "{ if (i > this.selectedIndex) i++; return i; }" ); eval("gBrowser.mTabContainer._getDropIndex = " + func); })();