Skip to content

Commit d0c5bfc

Browse files
authored
Possible prep for more SVGs (#1682)
* Few titles that were incorrect but now removed since placed offset * Offset uses HTML... exception made for this parsing * Since CSS is quite specific to these views leaving in there instead of common.css * Show documentation license on every page. * Scale a few things down even further Post #1678 Auto-merge
1 parent 85ce6b5 commit d0c5bfc

30 files changed

+48
-98
lines changed

controllers/document.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ exports.view = function (aReq, aRes, aNext) {
8484
var lines = null;
8585
var matches = null;
8686
var heading = null;
87+
var icon = null;
8788
var content = null;
8889

8990
if (aErr) {
@@ -99,12 +100,18 @@ exports.view = function (aReq, aRes, aNext) {
99100
} else {
100101
heading = document;
101102
}
103+
matches = lines[0].match(/^\<img src\=\"(.*?)\"/);
104+
if (matches) {
105+
icon = matches[1];
106+
lines.shift();
107+
}
102108
content = lines.join('\n');
103109

104110
// Page metadata
105111
pageMetadata(options, [heading, 'About']);
106112

107113
options.pageHeading = heading;
114+
options.pageIcon = icon;
108115
options.pageData = renderMd(content);
109116

110117
aCallback(null);
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
## Android
2-
3-
![Android icon][androidIcon]
2+
<img src="https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/android_icon.png" width="128" height="128">
43

54
Android is an operating system on many portable devices.
65

@@ -9,6 +8,5 @@ Android is an operating system on many portable devices.
98

109
[githubFavicon]: https://assets-cdn.github.com/favicon.ico
1110
[oujsFavicon]: https://github.com/raw/OpenUserJs/OpenUserJS.org/master/public/images/favicon16.png
12-
[androidIcon]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/android_icon.png
1311
[wikipediaAndroidOS]: https://www.wikipedia.org/wiki/Android_%28operating_system%29
1412
[TampermonkeyForAndroid]: Tampermonkey-for-Android

views/includes/documents/Chrome.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
## Chrome
2-
3-
![Chrome icon][chromeIcon]
2+
<img src="https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/chrome_icon.png" width="128" height="128">
43

54
Chrome is a free web browser developed by Google. Most of its code draws from the open-source [Chromium][] project. Chrome's selling points are security, speed, simplicity and stability. The desktop version runs on Windows, Linux and OS X, and there are mobile versions for Android and iOS.
65

@@ -14,7 +13,6 @@ To run userscripts on Chrome, you normally need a manager extension.
1413

1514
[githubFavicon]: https://assets-cdn.github.com/favicon.ico
1615
[oujsFavicon]: https://github.com/raw/OpenUserJs/OpenUserJS.org/master/public/images/favicon16.png
17-
[chromeIcon]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/chrome_icon.png "Chrome"
1816
[chromeBrowser]: https://www.google.com/chrome/browser/
1917
[wikipediaChrome]: https://www.wikipedia.org/wiki/Google_Chrome
2018
[chromeSupport]: https://support.google.com/chrome/

views/includes/documents/Chromium.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
## Chromium
2-
3-
![Chromium icon][chromiumIcon]
2+
<img src="https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/chromium_icon.png" width="128" height="128">
43

54
Chromium is a free open-source web browser. Chromium's selling points are security, speed, simplicity and stability. The desktop version runs on Windows, Linux and OS X, and there are mobile versions for Android and iOS.
65

@@ -14,7 +13,6 @@ To run userscripts on Chromium, you normally need a manager extension such as Ta
1413

1514
[githubFavicon]: https://assets-cdn.github.com/favicon.ico
1615
[oujsFavicon]: https://github.com/raw/OpenUserJs/OpenUserJS.org/master/public/images/favicon16.png
17-
[chromiumIcon]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/chromium_icon.png "Chromium"
1816
[chromiumBrowser]: http://dev.chromium.org/Home
1917
[wikipediaChromium]: https://www.wikipedia.org/wiki/Chromium_%28web_browser%29
2018
[chromiumSupport]: https://bugs.chromium.org/p/chromium/issues/list

views/includes/documents/Edge.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
## Edge
2-
3-
![Edge icon][edgeIcon]
2+
<img src="https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/edge_icon.png" width="128" height="128">
43

54
Edge is a web browser integrated into Microsoft Windows 10.
65

@@ -9,7 +8,6 @@ Edge is a web browser integrated into Microsoft Windows 10.
98

109
[githubFavicon]: https://assets-cdn.github.com/favicon.ico
1110
[oujsFavicon]: https://github.com/raw/OpenUserJs/OpenUserJS.org/master/public/images/favicon16.png
12-
[edgeIcon]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/edge_icon.png
1311
[wikipediaEdge]: https://www.wikipedia.org/wiki/Microsoft_Edge
1412
[wikipediaWindows10]: https://www.wikipedia.org/wiki/Windows_10
1513
[TampermonkeyForEdge]: Tampermonkey-for-Edge

views/includes/documents/Falkon.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
## Falkon
2-
3-
![Falkon icon][falkonIcon]
2+
<img src="https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/falkon_icon.png" width="128" height="128">
43

54
Falkon is very fast Qt based browser. It is actively developed and uses open standards *(so it's easier for programmers to work with it)*. It aims to be a lightweight web browser available through most major platforms. Previously it was called QupZilla.
65

@@ -92,7 +91,6 @@ Patches are usually submitted by using `$ git diff > mypatch.diff` to KDE.
9291

9392
[githubFavicon]: https://assets-cdn.github.com/favicon.ico
9493
[oujsFavicon]: https://github.com/raw/OpenUserJs/OpenUserJS.org/master/public/images/favicon16.png
95-
[falkonIcon]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/falkon_icon.png "Falkon"
9694
[falkonExtensionsScreenshot]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/falkon1.gif "Enabling the GreaseMonkey Extension"
9795
[oujsScriptPageScreenshot1]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/openuserjs_script.gif "Ready to install a script"
9896
[falkonScreenshot3]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/falkon3.png "Falkon start page with GreaseMoneky enabled"

views/includes/documents/Firefox.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
## Firefox
2-
3-
![Firefox icon][firefoxIcon]
2+
<img src="https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/firefox_icon.png" width="128" height="128">
43

54
Firefox is the browser portion of SeaMonkey as a free, open source web browser developed by the Mozilla community. It is actively developed and uses open standards *(so it's easier for programmers to work with it)*. This means that there are scripts and add-ons available for Firefox, and few compatibility issues with websites. Firefox is available for Windows, Mac OS X and Linux. There is also a [mobile version][firefoxBrowserForAndroid] that runs on Android.
65

@@ -14,7 +13,6 @@ SeaMonkey and Firefox were the first web browsers to support userscripts, thanks
1413

1514
[githubFavicon]: https://assets-cdn.github.com/favicon.ico
1615
[oujsFavicon]: https://github.com/raw/OpenUserJs/OpenUserJS.org/master/public/images/favicon16.png
17-
[firefoxIcon]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/firefox_icon.png "Firefox"
1816
[firefoxBrowserForAndroid]: https://play.google.com/store/apps/details?id=org.mozilla.firefox&utm_source=mozilla&utm_medium=Referral&utm_campaign=mozilla-org
1917
[firefoxBrowser]: https://www.getfirefox.com/
2018
[wikipediaMozilla]: https://www.wikipedia.org/wiki/Mozilla

views/includes/documents/Greasemonkey-Port-for-SeaMonkey.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Greasemonkey Port for SeaMonkey
2-
![Greasemonkey icon][greasemonkeyPortIcon]
2+
<img src="https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/greasemonkeyport_icon.png" width="128" height="128">
33

44
Greasemonkey Port is a userscript manager for SeaMonkey, originally written by Aaron Boodman and currently SeaMonkey front-end maintained by Marti, Ratty and/or Farby with some backend support from Anthony Lieuallen and Johan Sundström. It is the first extension to allow userscripts to be run in a web browser and is a near parallel branch of Greasemonkey itself. Originally Greasemonkey contained SeaMonkey support and is now split off.
55

@@ -61,7 +61,6 @@ Sometimes, when you use more than one userscript on the same web page, they need
6161
[aomUserScriptsScreenshot]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/greasemonkeyport5.png "Userscript management in SeaMonkey"
6262
[greasespot]: http://www.greasespot.net/
6363
[greasemonkeyPortWiki]: https://sourceforge.net/p/greasemonkey/wiki/Main_Page/
64-
[greasemonkeyPortIcon]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/greasemonkeyport_icon.png "Greasemonkey Port"
6564
[greasemonkeyPortSFscreenshot1]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/greasemonkeyport1.gif "Greasemonkey Port on SourceForge"
6665
[oujsScriptPageScreenshot]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/openuserjs_script.gif "Ready to install a script"
6766
[greasemonkeyInstallationScreenshot]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/greasemonkeyport4.gif "Greasemonkey Port script installation warning"

views/includes/documents/Greasemonkey-for-Firefox.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Greasemonkey for Firefox
2-
![Greasemonkey icon][greasemonkeyIcon]
2+
<img src="https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/greasemonkey_icon.min.svg?sanitize=true" width="128" height="128">
33

44
Greasemonkey is a userscript manager for Firefox, originally written by Aaron Boodman and currently Firefox front-end and back-end maintained by Anthony Lieuallen and Johan Sundström. It is the first extension to allow userscripts to be run in a web browser.
55

@@ -59,7 +59,6 @@ Sometimes, usually on a portable device, it may look like the userscript manager
5959
[aboutAddons]: about:addons
6060
[aomUserScriptsScreenshot]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/greasemonkey5.gif "Userscript management in Firefox"
6161
[greasespot]: https://www.greasespot.net/
62-
[greasemonkeyIcon]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/greasemonkey_icon.png "Greasemonkey"
6362
[greasemonkeyAMOscreenshot1]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/greasemonkey1.gif "Greasemonkey at Mozilla Add-Ons"
6463
[oujsScriptPageScreenshot]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/openuserjs_script.gif "Ready to install a script"
6564
[greasemonkeyInstallationScreenshot]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/greasemonkey4.gif "Greasemonkey script installation warning"

views/includes/documents/Linux.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
## Linux
2-
3-
![Linux icon][LinuxIcon]
2+
<img src="https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/tux_icon.png" width="128" height="128">
43

54
Linux is a free operating system and available from many distributions.
65

76
* [Linux on Wikipedia][wikipediaLinuxOS]
87

98
[githubFavicon]: https://assets-cdn.github.com/favicon.ico
109
[oujsFavicon]: https://github.com/raw/OpenUserJs/OpenUserJS.org/master/public/images/favicon16.png
11-
[LinuxIcon]: https://github.com/raw/wiki/OpenUserJS/OpenUserJS.org/images/tux_icon.png
1210
[wikipediaLinuxOS]: https://www.wikipedia.org/wiki/Linux

0 commit comments

Comments
 (0)