当前功能正在运行,并且已经运行多年,但是在过去 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 Black”套牌列表并单击图像示例上方的图标:Deckilst icon
我似乎无法弄清楚是什么导致它在 Chrome 中打开一个空白窗口,而它以前工作正常,这可能是 SSL 的问题吗?
谢谢
最佳答案
Chromium 团队 intentionally deprecated and removed the ability to open data URLs 。此更改似乎从 Chrome 61 开始生效。
关于javascript - 打开数据:text/plain window in chrome showing up blank,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46818033/