justinpotts / terml.io

Code for https://terml.io
0 stars 0 forks source link

Disambiguation fix #47

Open jeffw16 opened 8 years ago

jeffw16 commented 8 years ago

Issue by jeffw16 Friday Aug 21, 2015 at 23:24 GMT Originally opened as https://github.com/justinpotts/terml.io-retired/pull/38


For issue #37.


jeffw16 included the following code: https://github.com/justinpotts/terml.io-retired/pull/38/commits

jeffw16 commented 8 years ago

Comment by justinpotts Wednesday Oct 28, 2015 at 14:07 GMT


@jeffw16 Is this finished and ready to merge?

jeffw16 commented 8 years ago

Comment by jeffw16 Wednesday Oct 28, 2015 at 14:11 GMT


Not sure; it's been a while since I worked on this.

jeffw16 commented 8 years ago

Comment by justinpotts Wednesday Oct 28, 2015 at 14:11 GMT


Alright, give it a test and lmk

jeffw16 commented 8 years ago

Comment by justinpotts Wednesday Oct 28, 2015 at 14:11 GMT


We have a bunch of updates sitting in stage so I think it'd be beneficial to push them soon.

jeffw16 commented 8 years ago

Comment by jeffw16 Wednesday Oct 28, 2015 at 14:16 GMT


I encounter an error with the local testing DB; will report back with the error later.

jeffw16 commented 8 years ago

Comment by jeffw16 Thursday Oct 29, 2015 at 03:34 GMT


screen shot 2015-10-28 at 10 30 10 pm

Voici l'error. Perhaps it is just an issue with SQLite DB handling, or did I misconfigure the script, idk? I haven't tried any local MySQL instances yet.

I will try with the latest version to see if the bug has been fixed yet.

jeffw16 commented 8 years ago

Comment by jeffw16 Thursday Oct 29, 2015 at 03:42 GMT


Ran latest version; miraculously working.

jeffw16 commented 8 years ago

Comment by jeffw16 Thursday Oct 29, 2015 at 04:21 GMT


Ok, I have no idea what is wrong with my JavaScript now. It should be working, but it isn't. This is the error I'm getting:

https://stackoverflow.com/questions/13909567/cannot-read-property-innerhtml-of-null

Here's the JS... have any idea of what's wrong with it?

    <script>
      function disambig_replace( original_term, replacement_term ) {
        var disambig_textarea = document.getElementById("definitions").innerHTML; // definitions to be replaced
        var replacement = disambig_textarea.replace( original_term, replacement_term );
        document.getElementById("definitions").innerHTML = replacement;
      }
    </script>