From 677e42fe5b7b4e15ead2c8a91dc981d8ef8b64a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Musab=20K=C4=B1l=C4=B1=C3=A7?= Date: Fri, 25 Sep 2020 19:52:43 +0300 Subject: [PATCH] Add Github /raw link support --- htmlpreview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htmlpreview.js b/htmlpreview.js index e637c97..93f7c3d 100644 --- a/htmlpreview.js +++ b/htmlpreview.js @@ -2,7 +2,7 @@ var previewForm = document.getElementById('previewform'); - var url = location.search.substring(1).replace(/\/\/github\.com/, '//raw.githubusercontent.com').replace(/\/blob\//, '/'); //Get URL of the raw file + var url = location.search.substring(1).replace(/\/\/github\.com/, '//raw.githubusercontent.com').replace(/\/blob\//, '/').replace(/\/raw\//, '/'); //Get URL of the raw file var replaceAssets = function () { var frame, a, link, links = [], script, scripts = [], i, href, src;