Merge pull request #1386 from ether/fix-import-on-params

fix issue #1369 where params would break import
This commit is contained in:
John McLear 2013-01-22 08:05:04 -08:00
Родитель 1725fe318d e23108d199
Коммит c6882aa65a
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -211,9 +211,11 @@ var padimpexp = (function()
pad = _pad;
//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
var pad_root_url = document.location.href.replace(document.location.pathname, pad_root_path)
var pad_root_url = document.location.href.replace(document.location.pathname, pad_root_path);
//strip out params IE ?noColor=true
pad_root_url = pad_root_url.substring(0, pad_root_url.indexOf('?'));
//i10l buttom import
$('#importsubmitinput').val(html10n.get("pad.impexp.importbutton"));