Difference between revisions of "Template:Infobox body of water/Bookmarklet"
imported>Spidersmilk (revised) |
imported>Spidersmilk (corrected mistake) |
||
| Line 6: | Line 6: | ||
<nowiki> | <nowiki> | ||
| − | javascript:with(document.forms[0]){void(nt=prompt('Name ',wgTitle));void(ta=prompt('Basin countries ',''));void(loca=prompt('Location ',''));void(typ=prompt('Type ',''));void(wpSummary.value+='+[[Template:Infobox lake|infobox]] (see [[Template:Infobox_lake#Parameters|description of fields]], [[Wikipedia:WikiProject Lakes|WikiProject Lakes]]');void(wpTextbox1.value='{{Infobox lake\n | lake_name = '+nt+'\n | image_lake = \n | caption_lake = \n | image_bathymetry = \n | caption_bathymetry = \n | location = '+loca+'\n | coords = \n | type = '+typ+'\n | inflow = \n | outflow = \n | | + | javascript:with(document.forms[0]){void(nt=prompt('Name ',wgTitle));void(ta=prompt('Basin countries ',''));void(loca=prompt('Location ',''));void(typ=prompt('Type ',''));void(wpSummary.value+='+[[Template:Infobox lake|infobox]] (see [[Template:Infobox_lake#Parameters|description of fields]], [[Wikipedia:WikiProject Lakes|WikiProject Lakes]]');void(wpTextbox1.value='{{Infobox lake\n | lake_name = '+nt+'\n | image_lake = \n | caption_lake = \n | image_bathymetry = \n | caption_bathymetry = \n | location = '+loca+'\n | coords = \n | type = '+typ+'\n | inflow = \n | outflow = \n | outflow1 = \n | catchment = \n | basin_countries = '+ta+'\n | length = \n | width = \n | area = \n | depth = \n | max-depth = \n | volume = \n | residence_time = \n | shore = \n | elevation = \n | islands = \n | cities = \n | frozen = \n}}\n'+wpTextbox1.value);void(wpPreview.click())} |
</nowiki> | </nowiki> | ||
Revision as of 16:21, 8 January 2016
The following bookmarklet adds {{infobox lake}} in preview mode after prompting you for:
- name (prefilled with article title)
- basin countries
- location
- lake type
javascript:with(document.forms[0]){void(nt=prompt('Name ',wgTitle));void(ta=prompt('Basin countries ',''));void(loca=prompt('Location ',''));void(typ=prompt('Type ',''));void(wpSummary.value+='+[[Template:Infobox lake|infobox]] (see [[Template:Infobox_lake#Parameters|description of fields]], [[Wikipedia:WikiProject Lakes|WikiProject Lakes]]');void(wpTextbox1.value='{{Infobox lake\n | lake_name = '+nt+'\n | image_lake = \n | caption_lake = \n | image_bathymetry = \n | caption_bathymetry = \n | location = '+loca+'\n | coords = \n | type = '+typ+'\n | inflow = \n | outflow = \n | outflow1 = \n | catchment = \n | basin_countries = '+ta+'\n | length = \n | width = \n | area = \n | depth = \n | max-depth = \n | volume = \n | residence_time = \n | shore = \n | elevation = \n | islands = \n | cities = \n | frozen = \n}}\n'+wpTextbox1.value);void(wpPreview.click())}