Manages Firefox reader mode
In Reader mode Firefox has a special syntax for the URL of the current page. The URL is encoded and begins with "about:reader?url=" which can't be added to scuttle of course.
This commit is contained in:
parent
c83ca5472d
commit
b7969d172c
@ -14,7 +14,15 @@ function shareURL(){
|
|||||||
|
|
||||||
var tab = tabs[0];
|
var tab = tabs[0];
|
||||||
|
|
||||||
var url = instance + "/bookmarks.php?action=add&address=" + encodeURIComponent(tab.url) + "&title=" + tabs[0].title;
|
// manages Mozilla Firefox reader mode
|
||||||
|
var rawUrl = tab.url;
|
||||||
|
var partToRemove = partToRemove = "about:reader?url=";
|
||||||
|
if(rawUrl.includes(partToRemove)) {
|
||||||
|
rawUrl = rawUrl.substring(partToRemove.length);
|
||||||
|
rawUrl = decodeURIComponent(rawUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
var url = instance + "/bookmarks.php?action=add&address=" + encodeURIComponent(rawUrl) + "&title=" + tabs[0].title;
|
||||||
widthInt = Number(windowWidth);
|
widthInt = Number(windowWidth);
|
||||||
heightInt = Number(windowHeight);
|
heightInt = Number(windowHeight);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user