You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.
The content script currently injects an application regardless of whether the content returns status 200. Future versions should not change the User Experience for links that don't return content for injection. The injectable apps should decide whether they want to be displayed.
The text was updated successfully, but these errors were encountered:
I think the proper way to do this is to allow the injected iframe to ask the content script that injected it to:
Show the injected iframe (hide the link original link)
Destroy the injected iframe (remove the iframe from the DOM and show the original link)
To maintain consistency with how it is currently implemented, all links should temporarily show themselves while they are loading, but the injected iframe could then choose to destroy itself if it doesn't get a good status from the server or fails to decrypt.
Doing this properly will take a few implementation steps, the most challenging of which is figuring out how to get messages from the iframe to the content script. Since we already send a resize message to the content script, you should look at where the privly.js file sends and receives resize messages.
Modify privly.js's resize code to accept serialized JSON content. See JSON.stringify and JSON.parse().
Modify host_page_integration.js to send JSON instead of the current CSV format.
Change the resize command to be in JSON format with {privly:{resize:10}} could represent a command to the privly.js script to resize the iframe to 10 pixels.
Add functions to the host_page_integration.js script for showInjectedIframe and destroyInjectedIframe. These will both use the new JSON message format to tell the privly.js file to take the requested action.
Modify the privly.js file to take the requested action after examining the JSON message.
@smcgregor quick question. In the point #3 above {privly:{resize:10}} should represent the script to resize the iframe to 10px. is 'privly' the name of the iframe? I'm trying for {frameId : {resize:height}}
But, after JSON stringify it gets converted to {"frameId" : {"resize" : 41}} instead of {ifrm0 : {"resize" : 41}}
The content script currently injects an application regardless of whether the content returns status 200. Future versions should not change the User Experience for links that don't return content for injection. The injectable apps should decide whether they want to be displayed.
The text was updated successfully, but these errors were encountered: