Mat Kelly

Results 844 comments of Mat Kelly

Since the move to injection via shadow DOM, the new DOM elements never appear to be generated/displayed, causing an exception. This is because the injection code relies on the HTML...

`mink.js`, where this needs to be detected, only has access to the background page DOM, not the content script. A `countFrames()` message needs to be passed to `content.js` to retrieve...

Through the process, Mink hits http://mementoarchive.lanl.gov/tg/timemap/http://mementoweb.org/ . This returns three timemap definitions in the response body: ``` ;rel="original", ;rel="self "; type="application/link-format" , ;rel="timemap"; from="Tue, 29 Sep 2009 22:08:10 GMT"; until="Sun,...

MLN: They are all "the right one". They have from & untilattributes saying the period that they cover, essentially this is an [indexed timemap](https://tools.ietf.org/html/rfc7089#section-5.1.1). Adapting Mink interface to handle this....

Something like the following in `setActiveBasedOnBlacklistedProperty()` in `content.js`: ``` js var blackListEntryAsRegExp = new RegExp(blacklistEntryHosthame.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&")); var matchesWildcard = documentHostName.match(blackListEntryAsRegExp); if(matchesWildcard) { chrome.runtime.sendMessage({method: 'stopWatchingRequests_blacklisted'}); } ```

Twitter may be changing the URI without actually "loading" a new page in the traditional sense but instead relying on an Ajax query to get the new content. http://stackoverflow.com/questions/824349/modify-the-url-without-reloading-the-page

More info on manipulating the state of the browser without reloading using HTML5 and JS: https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history

Getting closer. I can detect the change in URI from the history manipulation but unless I call the native push state function, this breaks Twitter's rewriting methods. ``` var pushState...

A better solution, but the browser complains about an illegal invocation. the content script: ``` var headID = document.getElementsByTagName("head")[0]; var newScript = document.createElement('script'); newScript.type = 'text/javascript'; newScript.src = chrome.extension.getURL('script.js'); headID.appendChild(newScript);...

Maybe better, chrome now has a native implementation of this for extensions to use: https://developer.chrome.com/extensions/webNavigation