ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/website/www-content.git/commit/?id=e7ffcfcc8cbc4c9f29bb7545b2224223c749c897

commit e7ffcfcc8cbc4c9f29bb7545b2224223c749c897
Author: Andy Williams <[email protected]>
Date:   Mon Nov 20 13:31:40 2017 +0000

    Load and track pages when browsing embedded legacy docs
    
    Fixes T6388
---
 pages/develop/legacy/api/c/start.txt | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/pages/develop/legacy/api/c/start.txt 
b/pages/develop/legacy/api/c/start.txt
index 429ffce4..d78d5985 100644
--- a/pages/develop/legacy/api/c/start.txt
+++ b/pages/develop/legacy/api/c/start.txt
@@ -11,7 +11,19 @@ window.addEventListener('DOMContentLoaded', function(e) {
     var container = document.getElementById("embed-iframe");
     iframe.addEventListener('load', function(e) {
         size_to_content(container, iframe);
+
+        var url = iframe.contentWindow.location.href;
+        var pos = url.indexOf('/embed/')
+        if (pos)
+            document.location.hash = url.substring(pos + 7);
+
     }, true);
+
+    var page = document.location.hash.substring(1);
+    if (page) {
+        var url = '/develop/legacy/api/c/embed/' + page;
+        iframe.setAttribute("src", url);
+    }
 }, true);
 
 </JS>

-- 


Reply via email to