This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

ค้นหาฝ่ายสนับสนุน

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

เรียนรู้เพิ่มเติม

No response when importing password from ie or edge

  • 4 การตอบกลับ
  • 1 คนมีปัญหานี้
  • 2 ครั้งที่ดู
  • ตอบกลับล่าสุดโดย 晨旭

more options

when I importing password from ie or edge, my firefox will be no response.

(my passwords in ie are imported from a csv by a python script)

when I importing password from ie or edge, my firefox will be no response. (my passwords in ie are imported from a csv by a python script)

วิธีแก้ปัญหาที่เลือก

If you can convert the CSV file to an array in JSON format then you can easily import the passwords via the Browser Console.


var logins;
if (logins = prompt("Logins JSON: [{},{}]",logins)){
try { 
 logins = JSON.parse(logins);
 for (i=0; lg=logins[i]; i++){if (!lg.origin){lg.origin = lg.hostname}}
 ChromeUtils.import("resource://gre/modules/LoginHelper.jsm");
 LoginHelper.maybeImportLogins(logins);
} catch(e){ console.log(e); }
}
อ่านคำตอบนี้ในบริบท 👍 0

การตอบกลับทั้งหมด (4)

more options

วิธีแก้ปัญหาที่เลือก

If you can convert the CSV file to an array in JSON format then you can easily import the passwords via the Browser Console.


var logins;
if (logins = prompt("Logins JSON: [{},{}]",logins)){
try { 
 logins = JSON.parse(logins);
 for (i=0; lg=logins[i]; i++){if (!lg.origin){lg.origin = lg.hostname}}
 ChromeUtils.import("resource://gre/modules/LoginHelper.jsm");
 LoginHelper.maybeImportLogins(logins);
} catch(e){ console.log(e); }
}

เปลี่ยนแปลงโดย cor-el เมื่อ

more options

cor-el said

If you can convert the CSV file to an array in JSON format then you can easily import the passwords via the Browser Console.
if (logins = prompt("Logins JSON: [{},{}]",signons)){
try { 
 logins = JSON.parse(logins);
 ChromeUtils.import("resource://gre/modules/LoginHelper.jsm");
 LoginHelper.maybeImportLogins(logins);
} catch(e){ console.log(e); }
}

it shows:

ReferenceError: "ChromeUtils is not defined"

   <anonymous> debugger eval code:4

เปลี่ยนแปลงโดย cor-el เมื่อ

more options

Make sure you use the Browser Console (Ctrl+Shift+J) and not the Web Console.

  • "3-bar" menu button or Tools -> Web Developer
more options

it works! thanks a lot and, my convert script :


f = io.open([[D:\1.csv]],"rb") s = f:read("*a") f:close()

mt = s:split("\r\n") r = {}

for i=2,#mt do local temp = mt[i]:split(",") local tr = {} if #temp == 4 then tr.username = temp[3] tr.password = temp[4] tr.hostname = temp[2]:sub(1,temp[2]:find("/",9)-1) table.insert(r,tr) end end


JSON = require("JSON") rs = JSON:encode(r) print(rs)

เปลี่ยนแปลงโดย 晨旭 เมื่อ