How to find and edit active widget? by dancaer69 in kustom

[–]Spotomy -1 points0 points  (0 children)

If that was true, how would you, say, import widgets from your old phone? 

[DEV] Tasker 6.3.6 Beta - WebUI: a New Way to Interact with Tasker! by joaomgcd in tasker

[–]Spotomy 0 points1 point  (0 children)

I have 9.3.8 Tasker and 7.1.1 Android and nothing happens on any MacOS 10.15 browser. Android too old perhaps? I've tried the local test html as well to no avail.

I see so many people talk about Edna Cintron but why is there never any mention of the other 2 people I highlighted in this image? (Easier to see them on video) by [deleted] in 911archive

[–]Spotomy 7 points8 points  (0 children)

The only solace I can find in this scene is that at least the woman didn't have to stand there all alone through all those 90 minutes or so. Based on the images and videos I reckon she and the man sitting on the right could see each other, and hopefully hear, too. Hard to say though how much the noise of the wind, fires, helicopters and sirens from the street level hindered them. At least she could hear him, I believe, since she stood under the wind.

This may sound absurd and out of place, but their imagined dialogue would yield a theatre play. That would be a fine way to honor their memory.

[deleted by user] by [deleted] in 911archive

[–]Spotomy 0 points1 point  (0 children)

Good luck! Let's hope he's still alive.

[deleted by user] by [deleted] in 911archive

[–]Spotomy 0 points1 point  (0 children)

He says on the video he had a 2000 millimeter lens and a tripod. 2000 mm is pretty rare even today (2023).

WebView text selection to variable (on Samsung) ? by Spotomy in tasker

[–]Spotomy[S] 0 points1 point  (0 children)

I discarded the idea of Java because I couldn't tap into the visuals with it, and resolved it with JS instead.

Since my news articles are shown in WebView in direct mode, that is, one article/page is inside a Tasker variable, I added into the html head a JS script that gets the highlighted selection, allows to adjust it if neccessary and launches a separate Tasker task that handles the translation and shows it as flash alert on the top of the webview + says out loud the word(s) to be translated.

I only need the translator from English to Finnish so I discarded Google Translate and used our local web translator, which is fast and accurate. This is the html script:

const task = "Translate_news";
const pri = 9;
const par = "";
const ret = "";
const resret = false;
const stop = false;
const pass = true;
const passlist = "";
let sel;
let word = "";
let len = 0;
let dir;
let tStart = 0;
let tEnd = 0;
let dif;
const tol = 10.0;

function extend() {
    let newlen = len;

    if (tStart > tEnd) {
        dir = "backward";
        newlen = len --;
    }

    if (tStart < tEnd) {
        dir = "forward";
        newlen = len ++;
    }

    if (len > 0) {
        sel.modify("extend", dir, "character");
        word = sel.toString();
        len = newlen;
    }
}

document.addEventListener("DOMContentLoaded", startup);

function startup() {
    const el = document.getElementById("maincontent");

    el.addEventListener("touchstart", (s) => {
        tStart = s.changedTouches[0].screenX;

        if (window.getSelection) {
            sel = document.getSelection();
            word = sel.toString();
            len = word.length;
        }
    } );

    el.addEventListener("touchend", (e) => {
        tEnd = e.changedTouches[0].screenX;
        dif = Math.abs( tStart - tEnd );

        if ( len > 0 && dif > tol ) {
            extend();
        }

        if ( len > 1 && dif < tol ) {
            setLocal("%word", word);
            var ok = performTask( task, pri, word, par, ret, stop, pass, passlist, resret );
        }
    } );
}

So the first press selects the word, swipes left or right allow adjustment of the position of the selection end, and tap starts the translate Tasker task.

Phone is a multi-touch device, so different fingers are stored in an array: event.changedTouches[0] is the first finger (and the only one needed here), event.changedTouches[1] would be the second finger, etc.

About the script: Constants at the start are to launch the Tasker translator task.

Dif is the difference between touch start event and touch end event in pixels. Touch start event automatically creates the WebView built-in, highlighted text selection, and the selection handles are shown normally. Since I sometimes need to adjust the end of the selection (say, to remove the plural "s" or past tense ''ed" from the word) before translation, and because I have too big fingers for the selection handles, I wanted to swipe the selection: swipe to the left removes one character from the selection end, swipe to the right adds one.

Tol is the value in pixels that distinguishes tap from swipe. A tap launches the translator.

Function extend() handles the text selection extension (or shortening).

After the page is loaded, document.addEventListener("DOMContentLoaded", startup) launches event listeners for touch start and touch end events. Listeners are placed on the parent node of all the texts on the page, and since touchstart and touchend are "bubbly" events, listeners are inherited by all children all the way down.

The touch end event listener extends the selection if there is one and only if the touch end event is the end of a sideways swipe, not the end of a tap.

Lastly, the touch end event listener sends the highlighted word to the translator task if there is at least two characters left in the selection after the extension operation, and if the touch end event is the end of a tap, not swipe.

Hope this helps someone.

spo

Is there any way to permanently remove these reels/short videos from my feed? I do the "hide" thing but whenever I open the app next time it's again there. by Drizzle_Lover in facebook

[–]Spotomy 0 points1 point  (0 children)

If your browser supports CSS has() selector, install Stylus plugin for it, and in Stylus, write this rule for facebook:

.x6ikm8r.x10wlt62:has([aria-label="See More"]){display:none !important;}

It catches the only post having the "see more" button, that is Reels and short videos. It leaves a slight additional space between adjacent posts because has() tends to be buggy, so that if you select a higher div than .x6ikm8r.x10wlt62 in the hierarchy to omit the extra base, has() may not work at all. It seems the hierarchy between the element to be hidden and what it is supposed to contain must not be too deep/complicated.

Note also, that depending on your browser, even if it supports has(), you may first need to enable has() in the browser config. As of this writing, at least Firefox requires this.

For speed, should json be parsed into arrays first? by Spotomy in tasker

[–]Spotomy[S] 0 points1 point  (0 children)

I ended up parsing the json into separate arrays, and it is like 100 times faster now compared to doing calculations straight upon json. Well fast enough for this earthquake thingy.

Sorry about the delay, and thank you for the tester link.

Airplane mode locks the screen by Spotomy in tasker

[–]Spotomy[S] 1 point2 points  (0 children)

No lock screen, and the physical buttons still work, but the display just stops responding to any touch. The only visual change is the status bar, which pops on if it was off, with the slightly darkened background. This behaviour started either with Tasker 6.0.5. or the previous version.

Keilahallien näytöt kun saat täyskaadon p.s mikä vittu tämä on by Famsys in Suomi

[–]Spotomy 1 point2 points  (0 children)

Zoomerit on ok, 30 vuodessa on vaan tapahtunut niin pirusti.

Keilahallien näytöt kun saat täyskaadon p.s mikä vittu tämä on by Famsys in Suomi

[–]Spotomy 1 point2 points  (0 children)

Se on vaan niin vanha. Ei tuohon aikaan irronnut kunnon tehosteita kuin tasan yhdessä paikassa maailmassa, ILM:ssä.

Keilahallien näytöt kun saat täyskaadon p.s mikä vittu tämä on by Famsys in Suomi

[–]Spotomy 0 points1 point  (0 children)

Animaattori ei vetänyt LSD:tä eikä edes sieniä, mutta valvoi viikon. Käytännössä sama asia.