Open
Conversation
- add variable ‘picture’ that represents the value of the src attribute of the first child of #infobox that has an <img> tag - add variable ‘new_html’ to contain popup window html - wrap popup window html into a flex-box <div> - separate content into two divs: one for text and one for the picture - remove padding from cssRules - add padding for text <div> only - use ‘picture’ variable as source for the background image of the picture <div>
- remove wrap property from popup div - remove width property from content - change from background image to <img> - give img auto width, max height equal to the max height of the popup window, and a right margin of 10px
- select pictures from full article content rather than just the info box - update var picture to refer to the element itself rather than its src attribute - filter out pictures that are less than 100px in height
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi ellenbrook, I really enjoy using your extension Wikihover, but I often found myself wishing that there was a picture along with the text. I added a bit of code to the inject.js file to achieve this. It only shows pictures that are taller than 100px (to avoid displaying the little icons that accompany alert messages), and if there are no pictures that match the criteria the output will be identical to how it was before I added the changes. This is my first attempt at contributing to an open-source project so forgive me if I'm going about this the wrong way, but I wanted to share the changes with you in case it was something you were interested in implementing.
Thanks!
Wilding