mirror of
https://github.com/marty-oehme/scripts.git
synced 2025-12-10 22:12:45 +00:00
fixed task url detection
This commit is contained in:
parent
cb0da43ff5
commit
f83dc7d00e
2 changed files with 3 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import QtQml 2.0
|
||||
import com.qownnotes.noteapi 1.0
|
||||
import QOwnNotesTypes 1.0
|
||||
|
||||
/**
|
||||
* This script creates a menu item and a button that parses the text that was copied
|
||||
|
|
@ -63,7 +63,7 @@ QtObject {
|
|||
description = description.replace(/<br.*?>/gim, "\n").replace(/<.+?>/gim, "");
|
||||
|
||||
// var urlRegExp = /<form name="COMMENTS_.+?".*? action="(.+?)" method/im;
|
||||
var urlRegExp = /<a href="(.+?)[\?#].*?" class="main-buttons-item-link"/im;
|
||||
var urlRegExp = /<a href="(.+?\d+\/tasks\/task\/view\/d+\/)[\?#].*?" class="main-buttons-item-link"/im;
|
||||
var urlMatch = urlRegExp.exec(html);
|
||||
var url = urlMatch !== null ? urlMatch[1] : "";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue