I maintain shows, and films from several platforms within an OrgMode File. Now the string you get when sharing from netflix has unnecessary information.
I get rid of that with Tasker and a Java Scriptlet.
var endName = astext.search(" auf Netflix gesehen?") -1;
var text = astext.slice(15,endName);
endName = endName+24;
var replacer = astext.slice(0,endName);
var link = String(astext.replace(replacer));
With astext
as input source from AutoShare Netflix Toast Interception.
So far so good, but as I have actually never used JavaScript before I get to a problem I don't really understand.
Infront of my string stored in link
there is "undefinded" prepended.
I don't really know if I mess up JavaScript syntax or if there is something special with the interpreter Tasker is using.
This also happens if I instead of "resharing" the link simply print it out via Flash
Task in Tasker