gexur
New Member
Posts: 7
inherit
256278
0
Oct 17, 2018 5:37:27 GMT -8
gexur
7
September 2018
gexur
|
Post by gexur on Sept 23, 2018 10:17:07 GMT -8
Hi proboards, I need to add this script tag <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
but I don't know where :/ It's to include this JavaScript code prettifier code-prettify
|
|
inherit
140147
0
Apr 30, 2024 0:07:08 GMT -8
Nscalerr 🐺
Throw me to the wolves and I'll return leading the pack!
3,007
May 2009
nscalerr
|
Post by Nscalerr 🐺 on Sept 24, 2018 1:57:10 GMT -8
Hi gexurIf you go to Admin Home > Structure > Headers & Footers > Manage > Global Header & Footer, you can then add it to the Global Header. Don't forget to click Save after adding it.
|
|
gexur
New Member
Posts: 7
inherit
256278
0
Oct 17, 2018 5:37:27 GMT -8
gexur
7
September 2018
gexur
|
Post by gexur on Sept 24, 2018 5:30:32 GMT -8
Hi gexur If you go to Admin Home > Structure > Headers & Footers > Manage > Global Header & Footer, you can then add it to the Global Header. Don't forget to click Save after adding it. Hi Nscalerr 🐺, the javascript no load in threads :/
|
|
inherit
140147
0
Apr 30, 2024 0:07:08 GMT -8
Nscalerr 🐺
Throw me to the wolves and I'll return leading the pack!
3,007
May 2009
nscalerr
|
Post by Nscalerr 🐺 on Sept 25, 2018 0:02:56 GMT -8
Change it to just http, NOT https, then it will load from the Global Header. Looks like having https stops it from loading!
<script src="http://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
Also a link to your forum would help.
|
|
gexur
New Member
Posts: 7
inherit
256278
0
Oct 17, 2018 5:37:27 GMT -8
gexur
7
September 2018
gexur
|
Post by gexur on Sept 25, 2018 7:22:00 GMT -8
|
|
inherit
140147
0
Apr 30, 2024 0:07:08 GMT -8
Nscalerr 🐺
Throw me to the wolves and I'll return leading the pack!
3,007
May 2009
nscalerr
|
Post by Nscalerr 🐺 on Sept 25, 2018 21:34:43 GMT -8
We will have to wait for Brian to take a look as I am out of ideas.
Also < > don't work in posts, you have to use [ ] !
Changed the & amp; to a plain &.
<script src="http://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?lang=css&skin=sunburst"></script>
Btw the & amp; is only used when you want to display an ampersand in text on a web page.
|
|
#eb7100
33409
0
1
May 2, 2024 15:37:37 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Sept 26, 2018 13:41:46 GMT -8
Looks like it works to me. I just followed the directions on the GitHub page. Script embedded: HTML used to test: Nscalerr 🐺: HTTPS scripts are fine on an HTTP page. The restriction is the other way around: You can't embed an HTTP script on an HTTPS page.
|
|
gexur
New Member
Posts: 7
inherit
256278
0
Oct 17, 2018 5:37:27 GMT -8
gexur
7
September 2018
gexur
|
Post by gexur on Sept 26, 2018 16:08:40 GMT -8
It does not load, it's the same (sorry for my English)
|
|
#eb7100
33409
0
1
May 2, 2024 15:37:37 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Sept 27, 2018 7:44:19 GMT -8
You can't use HTML in a post, so it's not going to work there.
|
|
inherit
223470
0
Feb 27, 2019 17:05:53 GMT -8
₪» ⅀ ƪ Ƒ «₪
Original registration date: 2007. DeviantART: http://deviantart.com/ruanly. Discord: Ruanly#7946.
1,281
July 2015
fajita
|
Post by ₪» ⅀ ƪ Ƒ «₪ on Sept 27, 2018 10:15:08 GMT -8
gexur I know it's hard because you don't speak English natively, but can you explain what you are wanting to do with this code? What are you trying to create? Where are you trying to create it?
|
|
gexur
New Member
Posts: 7
inherit
256278
0
Oct 17, 2018 5:37:27 GMT -8
gexur
7
September 2018
gexur
|
Post by gexur on Sept 27, 2018 12:33:20 GMT -8
Fixed. I put this js in a plugin. $(function () {
var lenguajeEspecifico = ""; var skin = "sons-of-obsidian";
$.getScript("https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js?skin=" + (skin ? skin : "default") + (lenguajeEspecifico ? "?lang=" + lenguajeEspecifico : "")); $("code,td.code div.cont_code").wrapInner("<pre class='prettyprint" + (lenguajeEspecifico ? " lang-" + lenguajeEspecifico : "") + "' />"); }); Problem solved, thanks for your help.
|
|