Search code examples
javascriptjquerygreasemonkeyuserscripts

remove "bullet" symbol from html


I have a script that reads a list of addresses from a table and trace the route on google maps.

(Similar to my old one: how to use the google maps api with greasemonkey to read a table of addresses and trace the route?)

But there is a "bullet" symbol in front of every address, and google maps wont remove it to render the map, giving me the error below

enter image description here

this is the HTML for the table cell

enter image description here

Any hints on how to remove the "bullet" with JQuery/Javascript?


Solution

  • If you don't want to .substr(2) you can replace the 1st occurrence with:

    var s = $("#para").text().replace("\u2022", "");
    

    Where \u2022 is the character for the html bullet entity •