fix toot buttons in feed views when returning from redirect in "_self" mode, bump version

pull/53/head v0.9.8.7
lartsch 2022-12-29 10:47:09 -05:00
rodzic f23e7be502
commit 0e20ff2f98
4 zmienionych plików z 16 dodań i 3 usunięć

Wyświetl plik

@ -1,6 +1,6 @@
{ {
"name": "FediAct", "name": "FediAct",
"version": "0.9.8.6", "version": "0.9.8.7",
"description": "Simplifies interactions on other Mastodon instances than your own. Visit https://github.com/lartsch/FediAct for more.", "description": "Simplifies interactions on other Mastodon instances than your own. Visit https://github.com/lartsch/FediAct for more.",
"manifest_version": 2, "manifest_version": 2,
"content_scripts": [ "content_scripts": [

Wyświetl plik

@ -1,6 +1,6 @@
{ {
"name": "FediAct", "name": "FediAct",
"version": "0.9.8.6", "version": "0.9.8.7",
"description": "Simplifies interactions on other Mastodon instances than your own. Visit https://github.com/lartsch/FediAct for more.", "description": "Simplifies interactions on other Mastodon instances than your own. Visit https://github.com/lartsch/FediAct for more.",
"manifest_version": 3, "manifest_version": 3,
"content_scripts": [ "content_scripts": [

Wyświetl plik

@ -194,6 +194,16 @@ function replaceAll(str, find, replace) {
function redirectTo(url) { function redirectTo(url) {
// check if redirects are enabled at all // check if redirects are enabled at all
if (settings.fediact_redirects) { if (settings.fediact_redirects) {
if (settings.fediact_target == "_self") {
/* If browser back button was used, flush cache */
(function () {
window.onpageshow = function(event) {
if (event.persisted) {
window.location.reload();
}
};
})()
}
// check if alert before redirect is enabled and show the prompt if so // check if alert before redirect is enabled and show the prompt if so
if (settings.fediact_alert) { if (settings.fediact_alert) {
if (!confirm("Redirecting to " + url)) { if (!confirm("Redirecting to " + url)) {
@ -878,6 +888,9 @@ async function processToots() {
var actionExecuted = await executeAction(id, action, null) var actionExecuted = await executeAction(id, action, null)
if (actionExecuted) { if (actionExecuted) {
if (cacheIndex) { if (cacheIndex) {
console.log(cacheIndex)
console.log(tmpSettings.processed[cacheIndex])
console.log(tmpSettings.processed)
// set interacted to true // set interacted to true
tmpSettings.processed[cacheIndex][11] = true tmpSettings.processed[cacheIndex][11] = true
} }

2
src/inject.min.js vendored

File diff suppressed because one or more lines are too long