I make a chrome extension to change css and content of a webpage by URL. It's works very well. I make this to translate a private web application in english to french.
I have just a problem on the popup of the web application. It's a popup by a div in foreground and it's generating by javascript. So I can't change content by js or css.
In the source code I have this :
<script type="text/ng-template" id="modal.tpl">
<div class="modal-body">
<span class="book-fld"> My title </span>
<div ng-show="data.loading"><p class="text-center">in progress...</p></div>
</div>
<div class="footer">
<button class="btn btn-action" ng-click="closeModal()" ng-bind="data.fileUploaded ? 'Ok':'Close'">
</button>
</div>
</script>In this example, I would like to change by js or css all texts : "My tile", "in progress..." and "Close". When somes elements are in the body of page, I haven't problem to change it. I use this manifest :
{
"name": "My hack",
"version": "1.0",
"manifest_version": 2,
"content_scripts": [
{
"matches": ["http://mydomain.com/*"],
"css": ["hack.css"],
"js": ["jquery.js","hack.js"]
}
],
}How can I change something in this script by an chrome extension ? The js and css is it loading only on the load page ?
Thank for your help.
Are you sure it is generated in the top frame. ...if it's iframe you will need to set allframe option as true in the content script manifest. ...
Or if it's still happens in the top frame. ...add some timer delay code which will delay your js code.
Sent from LG
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/5ebf8134-31da-4be0-b831-b03fabebe2c4%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/groups/opt_out.