dellagustin / SAP_Note_Enhancer

A browser extension to Enhances SAP Note viewing. Its main feature is code highlighting of ABAP correction instructions.
https://chrome.google.com/webstore/detail/sap-note-enhancer/keibkcomemkcceddcddjdlncidohgedk
MIT License
10 stars 5 forks source link

me.sap.com missing in v1.11.0 #28

Closed mbtools closed 2 months ago

mbtools commented 3 months ago

Ref #27

I tried to remove and add again but me.sap.com is not included. Therefore, the highlighting doesn't work anymore:

image

image

dellagustin commented 3 months ago

It seems we have an intermittent behavior. I'll have to run some tests myself. If I remember well, the reason I expected it to work on me.sap.com is that the correction instructions are actually shown inside an iframe, and the iframe showed content from a domain that that matches one of the patterns shown in one of the screenhots. Thank you for reporting.

gepparta commented 2 months ago

I have the same problem. Would be nice to configure which sites could be accessed by myself in extension properties, for example.

dellagustin-sap commented 2 months ago

Hi all, I did some debugging, so, it happens that there are different way in which Correction Instructions are shown at me.sap.com, e.g.,:

I don't know exactly when one is used or when another is used, but inspecting the pages, the https://me.sap.com/corrins/variant is actually showing the CIs from an iframe that's loading https://launchpad.support.sap.com//#/corrins/0003171185/15841

image

That's why the extension works, as scripts are injected in that page.

With https://me.sap.com/correctioninstruction, I don't see any iframes in place, so I need to update the manifest and test if any of the existing scripts would work.

Would be nice to configure which sites could be accessed by myself in extension properties, for example.

That's not as simple as it sounds, different pages show CIs in different ways and may require hand crafted javascript code to do the color highlighting.

dellagustin-sap commented 2 months ago

Good news, extending the launchpad script to me.sap.com already produced good results:

image

I need to do some more testing, but I should put out a new version soon.

A side question, how often do you get an error like this?

image

for me it is quite frequent and it seems to be caused by a 502 Bad Gateway error on different requests.

dellagustin-sap commented 2 months ago

Ok, so, good news, it works... on microsoft edge. It did not work on chrome, and then I discovered this: https://developer.chrome.com/blog/mutation-events-deprecation SAP Note Enhancer observes DOMNodeInserted to do the highlighting of the CI code on the launchpad and now on me.sap.com, so I need to check how to replace that and retest.

dellagustin-sap commented 2 months ago

@mbtools @gepparta , the support for me.sap.com is implemented and I additionally fixed a but that was preventing code highlighting in newer versions of chrome. I sent the new version (1.12.0) for review on the Chrome Web Store, it should be published soon. The review takes from hours to days. I'll leave this issue open until then.

mbtools commented 2 months ago

Great. It works well with Chrome 128. I got the 502 once but not again. Apps often don't like if you open URLs directly which are so deep into the system. Anyway, thanks for the update 👍

dellagustin-sap commented 2 months ago

@mbtools @gepparta, version 1.12.0 is out, could you please update and retest? Chrome will eventually update it, but if you want to update it ahead of time, you can activate the developer tools:

image

I'll close this issue, but we can reopen it if there is any remaining issue.

gepparta commented 2 months ago

Works on my machine