1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 03:15:56 +00:00

initial for RIP prototype/scriptaculous

This commit is contained in:
Andrew Dolgov
2021-02-18 21:51:18 +03:00
parent 0b6a71f8ea
commit 70fa423026
26 changed files with 318 additions and 2394 deletions

View File

@@ -2,8 +2,8 @@ Plugins.Af_Readability = {
orig_attr_name: 'data-readability-orig-content',
self: this,
embed: function(id) {
const content = $$(App.isCombinedMode() ? ".cdm[data-article-id=" + id + "] .content-inner" :
".post[data-article-id=" + id + "] .content")[0];
const content = App.find(App.isCombinedMode() ? ".cdm[data-article-id=" + id + "] .content-inner" :
".post[data-article-id=" + id + "] .content");
if (content.hasAttribute(self.orig_attr_name)) {
content.innerHTML = content.getAttribute(self.orig_attr_name);

View File

@@ -3,7 +3,7 @@ require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
PluginHost.register(PluginHost.HOOK_ARTICLE_RENDERED_CDM, function (row) {
if (row) {
row.select("video").each(function (v) {
row.querySelectorAll("video").forEach(function (v) {
v.muted = true;
});
}
@@ -14,7 +14,7 @@ require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
PluginHost.register(PluginHost.HOOK_ARTICLE_RENDERED, function (row) {
if (row) {
row.select("video").each(function (v) {
row.querySelectorAll("video").forEach(function (v) {
v.muted = true;
});
}

View File

@@ -23,9 +23,6 @@ Plugins.Share = {
target.href = target.href.replace(/&key=.*$/,
"&key=" + new_link);
// eslint-disable-next-line no-new
new Effect.Highlight(target);
const icon = document.querySelector(".share-icon-" + id);
if (icon)

View File

@@ -7,8 +7,8 @@ Plugins.Shorten_Expanded = {
const row = $(id);
if (row) {
const content = row.select(".content-shrink-wrap")[0];
const link = row.select(".expand-prompt")[0];
const content = row.querySelector(".content-shrink-wrap");
const link = row.querySelector(".expand-prompt");
if (content) content.removeClassName("content-shrink-wrap");
if (link) Element.hide(link);