diff options
author | Andrew Dolgov <[email protected]> | 2018-12-13 09:54:41 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-12-13 09:54:41 +0300 |
commit | e53959322b3a5d362346ceccf320a11b1e98a790 (patch) | |
tree | fff451983e482e4833a16dc67ae25a90197e5d3a /plugins/embed_original/init.js | |
parent | d53cdaf815c86bf66a5577f575f76831679ed4f2 (diff) |
plugins/embed_original: move to attic repo
Diffstat (limited to 'plugins/embed_original/init.js')
-rw-r--r-- | plugins/embed_original/init.js | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/plugins/embed_original/init.js b/plugins/embed_original/init.js deleted file mode 100644 index 1e9fcb253..000000000 --- a/plugins/embed_original/init.js +++ /dev/null @@ -1,56 +0,0 @@ -function embedOriginalArticle(id) { - const hasSandbox = "sandbox" in document.createElement("iframe"); - - if (!hasSandbox) { - alert(__("Sorry, your browser does not support sandboxed iframes.")); - return; - } - - let c = false; - - if (App.isCombinedMode()) { - c = $$("div#RROW-" + id + " div[class=content-inner]")[0]; - } else if (id == Article.getActive()) { - c = $$(".post .content")[0]; - } - - if (c) { - const iframe = c.parentNode.getElementsByClassName("embeddedContent")[0]; - - if (iframe) { - Element.show(c); - c.parentNode.removeChild(iframe); - - if (App.isCombinedMode()) { - Article.cdmScrollToId(id, true); - } - - return; - } - } - - const query = { op: "pluginhandler", plugin: "embed_original", method: "getUrl", id: id }; - - xhrJson("backend.php", query, (reply) => { - if (reply) { - const iframe = new Element("iframe", { - class: "embeddedContent", - src: reply.url, - width: (c.parentNode.offsetWidth - 5) + 'px', - height: (c.parentNode.parentNode.offsetHeight - c.parentNode.firstChild.offsetHeight - 5) + 'px', - style: "overflow: auto; border: none; min-height: " + (document.body.clientHeight / 2) + "px;", - sandbox: 'allow-scripts', - }); - - if (c) { - Element.hide(c); - c.parentNode.insertBefore(iframe, c); - - if (App.isCombinedMode()) { - Article.cdmScrollToId(id, true); - } - } - } - }); - -} |