All shared elements should also be shared in the code and not copy pasted (like currently in T234205).
Advantages: simplified maintenance, easy reuse of elements and addition of new types
Current types: reference preview, page preview, disambiguation, empty
Elements (all optional):
- header: icon & title
- content: text & image
- footer: text/link & cogwheel
- Extend existing function renderPreview() to include needed options like cogwheel and title icon.
- Create structure of the popup in html and fill data with shared js functions. Example in html and pseudocode:
<title> <img class="icon"></img </title> <div class="content"></div> <footer> <div class="settings"></div> </footer>
... if($(.settings)) addSettingsCogwheel() ...