Merge pull request #1388 from ether/proper-fix-for-import-url
fix import without params
This commit is contained in:
commit
557b5c1ad0
1 changed files with 2 additions and 4 deletions
|
@ -212,10 +212,8 @@ var padimpexp = (function()
|
||||||
|
|
||||||
//get /p/padname
|
//get /p/padname
|
||||||
var pad_root_path = new RegExp(/.*\/p\/[^\/]+/).exec(document.location.pathname);
|
var pad_root_path = new RegExp(/.*\/p\/[^\/]+/).exec(document.location.pathname);
|
||||||
//get http://example.com/p/padname
|
//get http://example.com/p/padname without Params
|
||||||
var pad_root_url = document.location.href.replace(document.location.pathname, pad_root_path);
|
var pad_root_url = document.location.protocol + '//' + document.location.host + document.location.pathname;
|
||||||
//strip out params IE ?noColor=true
|
|
||||||
pad_root_url = pad_root_url.substring(0, pad_root_url.indexOf('?'));
|
|
||||||
|
|
||||||
//i10l buttom import
|
//i10l buttom import
|
||||||
$('#importsubmitinput').val(html10n.get("pad.impexp.importbutton"));
|
$('#importsubmitinput').val(html10n.get("pad.impexp.importbutton"));
|
||||||
|
|
Loading…
Reference in a new issue