ProximaNova / Booru-mass-editor

Quickly edit images at websites running Gelbooru Beta 0.1.11 (such as http://booru.org)
7 stars 2 forks source link

Lookarounds with Javascript's Regex #1

Closed ProximaNova closed 8 years ago

ProximaNova commented 8 years ago
If only it was possible {
    I could replace ? <a>tag</a> # with ? <a>tag</a>&nbsp;#
} else {
    :(
}

Vim would work (I don't know if JavaScript can back-reference though):

:%s/? <a href="index.php?page=post&amp;s=list&amp;tags=(.*?)>.*?<\/a> (\d+)<\/span>
/? <a href="index.php?page=post&amp;s=list&amp;tags=\1>\1<\/a>&nbsp;\2<\/span>/g

But I could modify <li> elements in <div id="tag_list">

Also jQuery doesn't work with userscripts: if it did then it would help with child selection

Eh, I accomplished it with a sort of weird method.