Firefox 또는 SeaMonkey에서 URL 목록을 여는 방법은 무엇입니까?

Firefox 또는 SeaMonkey에서 URL 목록을 여는 방법은 무엇입니까?

예를 들어 텍스트 파일에 URL 목록이 있습니다.

http://url1
http://url2
http://url3

새 탭을 만들고, 주소 표시줄에 복사하고, 각 URL에 대해 Return 키를 누르는 번거로움 없이 Firefox(또는 SeaMonkey)의 한 탭에서 각각을 여는 방법이 궁금합니다.

내 OS는 우분투 10.10입니다. 명령줄과 GUI 솔루션 모두 환영합니다.

답변1

다음을 HTML 파일에 저장할 수 있습니다.

<!doctype html>
<html>
<head>
<title>Open Windows</title>
<script>
function openWindow(){
    var x = document.getElementById('a').value.split('\n');
    for (var i = 0; i < x.length; i++)
        if (x[i].indexOf('.') > 0)
            if (x[i].indexOf('://') < 0)
                window.open('http://'+x[i]);
            else
                window.open(x[i]);
}
</script>
<style>
html, body
{
    height : 99%;
    width  : 99%;
}

textarea
{
    height : 80%;
    width  : 90%;
}
</style>
</head>
<body>
<textarea id="a"></textarea>
<br>
<input type="button" value="Open Windows" onClick="openWindow()">
<input type="button" value="Clear" onClick="document.getElementById('a').value=''">
</body>
</html>

이제 Firefox에서 파일을 로드하고 텍스트 영역의 URL 목록을 복사한 다음 를 클릭하세요 Open Windows.

답변2

간단한

firefox $(cat file.txt)

충분해야합니다. firefox모든 링크가 공백으로 구분되어 있는 한 각 링크를 명령에 대한 인수로 전달합니다 .

답변3

Windows에서는 배치 파일(예: multiurl.bat)을 만들 수 있습니다.

@echo off    
for /F "eol=c tokens=1" %%i in (%1) do "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" %%i

그런 다음 multiurl.bat urls.txt명령줄에서 실행하면 FireFox가 이미 열려 있는 경우 새 탭에 URL이 로드되거나, 실행된 다음 URL이 로드됩니다.

답변4

Firefox에서 다음과 같이 텍스트 파일을 엽니다.

file:///C:/URLTextFile.txt
  1. 전체 링크 선택
  2. 마우스 오른쪽 버튼을 클릭하세요.
  3. "새 탭에서 링크 열기"를 클릭하세요.

관련 정보