Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The plugin seems to receive its information asynchronously from the server and act upon it, i.e. change the content of the page. Have you tried listening to DOM mutation events?</p> <p>Here is an example how they work when the user causes a change in the web page:</p> <pre><code>&lt;html&gt; &lt;!-- This is just mock-up to allow user to modify the DOM --&gt; &lt;body&gt; Text to add: &lt;input id="in1" type="text"/&gt; &lt;button onclick="addNode();"&gt;Add node&lt;/button&gt; &lt;p id="toAdd"&gt;&lt;/p&gt; &lt;/body&gt; &lt;script type="text/javascript"&gt; function addNode() { // adds a text node to the &lt;p&gt; element document .getElementById("toAdd") .appendChild(document .createTextNode(document .getElementById("in1") .value ) ); } /////////////////////////////////////// // Here comes the interesting part: !!! document .getElementById("toAdd") // listen to modifications of the &lt;p&gt; element .addEventListener( "DOMSubtreeModified", // in this case all modifications of its subtree function() { alert('Modified!'); // change this to whatever fits your purpose } ); &lt;/script&gt; &lt;/html&gt; </code></pre> <p>More about mutation events <a href="https://developer.mozilla.org/en/DOM/Mutation_events" rel="nofollow noreferrer">here</a>. If you want to support IE &lt; 9, you'll need a different approach. Maybe periodically check, e.g. every 100 ms, whether the web page contains the English button and change it into French. See <a href="https://stackoverflow.com/questions/1224463/is-there-any-way-to-call-a-function-periodically-in-javascipt">setInterval()</a>. This should be future-proof (mutation events are deprecated), but probably even more inefficient (slow).</p> <p>In any case, it's a hack. Only LinkedIn can provide a clean solution, e.g. allowing for a language code parameter for the plugin.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload