我想根据页面标签中的文本查找或创建一个可以创建并保存到文件夹的 Firefox 扩展。
我希望它执行以下操作:
a. Check the page's html for a certain tag name (e.g. <itemName>),
b. Use a regular expression to look for a text pattern within the tag mentioned above (e.g. first and last name like - <itemName>Abe Lincoln</itemName>),
c. Compare that pattern to folders already existing on the computer,
c-i. If the folder exists, then just save the file (from a certain domain, in certain tag, etc) from the page to that folder,
c-ii. If the folder does not exist, then create it and then save the aforementioned file from the page to that folder.
d. Close the page/tab.
我一直在网上搜索类似的东西,但到目前为止,我还没有找到可以做到这一点的东西。有这样的事情吗?如果没有,是否可以创建一个可以使用正则表达式的扩展,就像我需要的那样?
感谢您在这方面的帮助。