This repository was archived by the owner on Apr 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,32 @@ and the tooltips should work without problem.
94
94
.. _install Read the Docs locally following these instructions : https://docs.readthedocs.io/en/stable/development/install.html
95
95
96
96
97
+ Modifying ``hoverxref.js `` on the fly
98
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99
+
100
+ Instead of rebuilding the whole project,
101
+ we can modify the Javascript file that has the ``hoverxref_api_host `` hardcoded to point it to our local instance.
102
+
103
+ #. Open the documentation page you want to try on Google Chrome
104
+ #. Press :kbd: `F12 `
105
+ #. Go to the :guilabel: `Sources `
106
+ #. Find out the file ``js/hoverxref.js ``
107
+ #. Modify the function ``getEmbedURL `` to point the ``url `` variable to the local instance:
108
+
109
+ * ``/_ `` to use the proxied API
110
+ * ``http://community.dev.readthedocs.io `` to use the regular API
111
+
112
+
113
+ .. tip ::
114
+
115
+ This trick is useful for online documentation we don't control and want to test a change in the backend works as we expect.
116
+ However, to do this, you will need to allow insecure content in your Chrome instance first:
117
+
118
+ .. prompt :: bash
119
+
120
+ google-chrome-stable --allow-running-insecure-content --user-data-dir='/tmp/testing'
121
+
122
+
97
123
Permanent tooltip to work with CSS
98
124
----------------------------------
99
125
You can’t perform that action at this time.
0 commit comments