New Member
Post by ziz59 on Jul 10, 2016 4:57:25 GMT -5
Hi develloper, Just inform polarity is very good apps, i like !!! Just a question, i have a website used userscript in opened javascript popup, normaly in greasmonkey or tampermonkey or violent monkey. problem is not work, because in your browser system import userscript, and work just if is opened in tab, so not worked in popup creaed in javascript with method window.open(); i see in other trhead, you maked possibility to create or add extensions tampermonkey, or greasmonkey, its possible if you make this, you are very big great. but just just know when you made? it is complicated? Thank's by advance for informations !!!
|
|
New Member
Post by ziz59 on Nov 28, 2016 4:54:43 GMT -5
hi Stanley, why my post is marked SOLVED Sorry but please help me, i tried many test and i confirm javascript or jquery not work in popup name for (userscript). exemple i open a popup by method: window.open("URL", "NAME", "width=300, height=300"); my userscript just find a div and make change css. $("#iddiv").css("border","1px solid red"); my userscript not work in this popup but if i open in tab work !!! why ?? please explain ??
|
|
Post by Stanley Lim on Dec 4, 2016 21:58:45 GMT -5
Thanks for the reminder and sorry for the confusion! This issue has been fixed and will be released with Polarity 8.3.9.
|
|
New Member
Post by ziz59 on Apr 14, 2017 10:20:13 GMT -5
hello admin, I come back to you because I noticed you mention that userscript now works in polarity web, and since version 8.3.9 !! Really pleased with the idea of testing, but alas soon disappointed. Now, let me tell you again that sorry but still does not work in a popup !!! So I really would like it to work, it would be really great and I thank you in advance. So that you can see for yourself: - I download the latest portable version. please load this html for open popup method : <html> <body>
<button onclick="openWin()">Open "myWindow"</button> <button onclick="closeWin()">Close "myWindow"</button>
<script> var myWindow;
function openWin() { myWindow = window.open("", "myWindow", "width=200,height=100"); myWindow.location = "http://www.google.fr" }
function closeWin() { myWindow.close(); } </script>
</body> </html> and load this color.js in userscript : function changeBackground(color) { document.body.style.background = color; } if (window.location.href.indexOf('www.google.fr') > -1) { changeBackground('red');
} you see i have add control location.href for this script not run in all tab ... => now confirm please work or not work My request is if possibility run in popup javascript, you are the best !!!
|
|
Post by Stanley Lim on Apr 16, 2017 9:09:01 GMT -5
Hey ziz59, Just ran a test and I see the issue that you are reporting. The reason why the userscript does not load since it is opening the new window in the internal manager within Blink (the browser itself). Basically, this means that I don't have access in that window so I can inject scripts into it. However, if you open the link in a new window that has a link rather than a JS prompt, then it should open a new window managed by Polarity and the script will be injected. The test can be seen below. Sorry for the inconvenience, but this is one of the things in the browser engine that makes it more restricted than I expected.
|
|
New Member
Post by ziz59 on Apr 17, 2017 5:30:02 GMT -5
Ah thanks stanley, so impossible for you to make compatible the possibility to run the script in the popup create via javascript? It is really damaging because my application needs to cooperate with the popups, because they each have a reference !!!!
Yes I confirm that in a tab or via a popup link <a> tag, it works but no interaction possible because it is not binding by an id !!!
I would like you to succeed in doing it or make compatible, that would be really great!
|
|
Post by Stanley Lim on Apr 20, 2017 12:36:03 GMT -5
Ah thanks stanley, so impossible for you to make compatible the possibility to run the script in the popup create via javascript? It is really damaging because my application needs to cooperate with the popups, because they each have a reference !!!! Yes I confirm that in a tab or via a popup link <a> tag, it works but no interaction possible because it is not binding by an id !!! I would like you to succeed in doing it or make compatible, that would be really great! I will see if it is possible to capture the javascript dialog and inject the same scripts into them if possible in the next update. The reason why those popup dialogs are used instead of the regular pop up windows since they allow session data to be passed through while I don't have that level of access for the regular pop ups. But I'll see if there is a way to make it compatible.
|
|
New Member
Post by ziz59 on Apr 22, 2017 5:13:31 GMT -5
Thank you stanley for your work and professionalism !!! I hope you will succeed !!! Keep me informed as soon as you have done the necessary.
|
|