2017-10-18 5 views
0

현재 기능이 작동하며 지난 3 주 동안 갑자기 Chrome 사용자가 일반 텍스트 문서에 액세스 할 수 없지만 다른 사용자는 계속 작업하고 있습니다. 브라우저.데이터 열기 : 크롬의 텍스트/일반 창이 비어 있습니다.

는 기본적으로 함수는 다음과 같이 실행합니다

<a class="modo-link" target="_blank" data-modo="4%20Aether%20Hub%0A4%20Botanical%20Sanctum%0A1%20Blooming%20Marsh%0A3%20Forest%0A1%20Island%0A2%20Mountain%0A3%20Rootbound%20Crag%0A1%20Sheltered%20Thicket%0A2%20Spirebluff%20Canal%0A1%20Swamp%0A4%20Bristling%20Hydra%0A3%20Glorybringer%0A4%20Longtusk%20Cub%0A4%20Rogue%20Refiner%0A4%20Servant%20of%20the%20Conduit%0A2%20The%20Scarab%20God%0A4%20Whirler%20Virtuoso%0A2%20Abrade%0A4%20Attune%20with%20Aether%0A2%20Essence%20Scatter%0A4%20Harnessed%20Lightning%0A1%20Magma%20Spray%0A%0ASideboard%0A2%20Cartouche%20of%20Ambition%0A2%20Chandra's%20Defeat%0A1%20Confiscation%20Coup%0A3%20Negate%0A1%20Supreme%20Will%0A2%20Spell%20Pierce%0A1%20Hour%20of%20Glory%0A1%20Struggle%2FSurvive%0A2%20Vizier%20of%20Many%20Faces"><img src="https://227rsi2stdr53e3wto2skssd7xe-wpengine.netdna-ssl.com/wp-content/plugins/crystal-catalog-helper/assets/img/modologo.png"></a> 

$('.modo-link').on('click', function() { 
    var win = window.open('data:text/plain;charset=utf-8,' + $(this).attr('data-modo'), '_blank'); 
    win.focus(); 
}); 

예는 여기에 있습니다 : https://www.channelfireball.com/articles/the-return-of-nationals/

는 그냥 "Temur 블랙"갑판 목록을 발견하고 이미지 예를 들어 위의 아이콘을 클릭합니다 : Deckilst icon

Chrome에서 빈 창이 제대로 작동하는 데 어떤 원인이 있는지 파악할 수 없습니다. SSL 일 수 있습니까?

감사

답변

0

그것은 크롬에서 작동하지 않습니다하지만 당신은 같은 대체 솔루션을 사용할 수 있습니다

var w = window.open(""); 
w.document.write('Your Text Here'); 

그것은 모든 주요 브라우저에서 작동하고 있습니다.

+0

그런 종류의 도움이되지만 빠른 다운로드를 위해 .txt 파일로 유지해야합니다. –

0

Ahmed의 방법을 사용하여 작동하게되었지만 URI를 디코딩하고 휴식 시간을 <br>으로 바꿔야한다고 생각합니다. 정상적으로 작동 할 것입니다.

var win = window.open(); 
win.document.write(decodeURIComponent($(this).attr('data-modo')).replace(/(?:\r\n|\r|\n)/g, '<br/>')); 
win.focus(); 

그러나 누군가 텍스트를 사용하여 계속 사용하려면 다른 답변을 알려주세요.