mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 11:55:56 +00:00
plugins: run eslint const/let fixes
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
function showTrgmRelated(id) {
|
function showTrgmRelated(id) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
var query = "backend.php?op=pluginhandler&plugin=af_psql_trgm&method=showrelated¶m=" + param_escape(id);
|
const query = "backend.php?op=pluginhandler&plugin=af_psql_trgm&method=showrelated¶m=" + param_escape(id);
|
||||||
|
|
||||||
if (dijit.byId("trgmRelatedDlg"))
|
if (dijit.byId("trgmRelatedDlg"))
|
||||||
dijit.byId("trgmRelatedDlg").destroyRecursive();
|
dijit.byId("trgmRelatedDlg").destroyRecursive();
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
|
|||||||
console.log("af_zz_noautoplay!");
|
console.log("af_zz_noautoplay!");
|
||||||
console.log(row);
|
console.log(row);
|
||||||
|
|
||||||
var videos = row.getElementsByTagName("video");
|
const videos = row.getElementsByTagName("video");
|
||||||
console.log(row.innerHTML);
|
console.log(row.innerHTML);
|
||||||
|
|
||||||
for (i = 0; i < videos.length; i++) {
|
for (i = 0; i < videos.length; i++) {
|
||||||
@@ -23,7 +23,7 @@ require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
|
|||||||
|
|
||||||
PluginHost.register(PluginHost.HOOK_ARTICLE_RENDERED, function (row) {
|
PluginHost.register(PluginHost.HOOK_ARTICLE_RENDERED, function (row) {
|
||||||
if (row) {
|
if (row) {
|
||||||
var videos = row.getElementsByTagName("video");
|
const videos = row.getElementsByTagName("video");
|
||||||
|
|
||||||
for (i = 0; i < videos.length; i++) {
|
for (i = 0; i < videos.length; i++) {
|
||||||
videos[i].removeAttribute("autoplay");
|
videos[i].removeAttribute("autoplay");
|
||||||
@@ -38,4 +38,4 @@ require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
function embedOriginalArticle(id) {
|
function embedOriginalArticle(id) {
|
||||||
try {
|
try {
|
||||||
var hasSandbox = "sandbox" in document.createElement("iframe");
|
const hasSandbox = "sandbox" in document.createElement("iframe");
|
||||||
|
|
||||||
if (!hasSandbox) {
|
if (!hasSandbox) {
|
||||||
alert(__("Sorry, your browser does not support sandboxed iframes."));
|
alert(__("Sorry, your browser does not support sandboxed iframes."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var query = "op=pluginhandler&plugin=embed_original&method=getUrl&id=" +
|
const query = "op=pluginhandler&plugin=embed_original&method=getUrl&id=" +
|
||||||
param_escape(id);
|
param_escape(id);
|
||||||
|
|
||||||
var c = false;
|
let c = false;
|
||||||
|
|
||||||
if (isCdmMode()) {
|
if (isCdmMode()) {
|
||||||
c = $$("div#RROW-" + id + " div[class=cdmContentInner]")[0];
|
c = $$("div#RROW-" + id + " div[class=cdmContentInner]")[0];
|
||||||
@@ -19,7 +19,7 @@ function embedOriginalArticle(id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (c) {
|
if (c) {
|
||||||
var iframe = c.parentNode.getElementsByClassName("embeddedContent")[0];
|
const iframe = c.parentNode.getElementsByClassName("embeddedContent")[0];
|
||||||
|
|
||||||
if (iframe) {
|
if (iframe) {
|
||||||
Element.show(c);
|
Element.show(c);
|
||||||
@@ -36,11 +36,11 @@ function embedOriginalArticle(id) {
|
|||||||
new Ajax.Request("backend.php", {
|
new Ajax.Request("backend.php", {
|
||||||
parameters: query,
|
parameters: query,
|
||||||
onComplete: function(transport) {
|
onComplete: function(transport) {
|
||||||
var ti = JSON.parse(transport.responseText);
|
const ti = JSON.parse(transport.responseText);
|
||||||
|
|
||||||
if (ti) {
|
if (ti) {
|
||||||
|
|
||||||
var iframe = new Element("iframe", {
|
const iframe = new Element("iframe", {
|
||||||
class: "embeddedContent",
|
class: "embeddedContent",
|
||||||
src: ti.url,
|
src: ti.url,
|
||||||
width: (c.parentNode.offsetWidth-5)+'px',
|
width: (c.parentNode.offsetWidth-5)+'px',
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
function mailtoArticle(id) {
|
function mailtoArticle(id) {
|
||||||
try {
|
try {
|
||||||
if (!id) {
|
if (!id) {
|
||||||
var ids = getSelectedArticleIds2();
|
const ids = getSelectedArticleIds2();
|
||||||
|
|
||||||
if (ids.length == 0) {
|
if (ids.length == 0) {
|
||||||
alert(__("No articles are selected."));
|
alert(__("No articles are selected."));
|
||||||
@@ -14,7 +14,7 @@ function mailtoArticle(id) {
|
|||||||
if (dijit.byId("emailArticleDlg"))
|
if (dijit.byId("emailArticleDlg"))
|
||||||
dijit.byId("emailArticleDlg").destroyRecursive();
|
dijit.byId("emailArticleDlg").destroyRecursive();
|
||||||
|
|
||||||
var query = "backend.php?op=pluginhandler&plugin=mailto&method=emailArticle¶m=" + param_escape(id);
|
const query = "backend.php?op=pluginhandler&plugin=mailto&method=emailArticle¶m=" + param_escape(id);
|
||||||
|
|
||||||
dialog = new dijit.Dialog({
|
dialog = new dijit.Dialog({
|
||||||
id: "emailArticleDlg",
|
id: "emailArticleDlg",
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ var _shorten_expanded_threshold = 1.5; //window heights
|
|||||||
|
|
||||||
function expandSizeWrapper(id) {
|
function expandSizeWrapper(id) {
|
||||||
try {
|
try {
|
||||||
var row = $(id);
|
const row = $(id);
|
||||||
|
|
||||||
console.log(row);
|
console.log(row);
|
||||||
|
|
||||||
if (row) {
|
if (row) {
|
||||||
var content = row.select(".contentSizeWrapper")[0];
|
const content = row.select(".contentSizeWrapper")[0];
|
||||||
var link = row.select(".expandPrompt")[0];
|
const link = row.select(".expandPrompt")[0];
|
||||||
|
|
||||||
if (content) content.removeClassName("contentSizeWrapper");
|
if (content) content.removeClassName("contentSizeWrapper");
|
||||||
if (link) Element.hide(link);
|
if (link) Element.hide(link);
|
||||||
@@ -30,8 +30,8 @@ require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
|
|||||||
|
|
||||||
window.setTimeout(function() {
|
window.setTimeout(function() {
|
||||||
if (row) {
|
if (row) {
|
||||||
var c_inner = row.select(".cdmContentInner")[0];
|
const c_inner = row.select(".cdmContentInner")[0];
|
||||||
var c_inter = row.select(".cdmIntermediate")[0];
|
const c_inter = row.select(".cdmIntermediate")[0];
|
||||||
|
|
||||||
if (c_inner && c_inter &&
|
if (c_inner && c_inter &&
|
||||||
row.offsetHeight >= _shorten_expanded_threshold * window.innerHeight) {
|
row.offsetHeight >= _shorten_expanded_threshold * window.innerHeight) {
|
||||||
|
|||||||
Reference in New Issue
Block a user