• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Documentation Iframe

C

CedSharp

Guest
Hey there all.
I often like to link to a page in the documentation.
The problem is since it's a single-page application, and uses an iframe,
I cannot simply visit a page and copy the address...

I have to ( in chrome ):
  1. Search for the page ( obviously )
  2. Right click inside the iframe and select "view iframe source"
  3. In the new tab full of code, the address bar contains the address of the iframe, which I can finally copy

Or, another way is as follow:
  1. Search for the page
  2. Hold Control and click on a page
  3. The new tab will contain the link
The problem with that method is that if a link on the left panel opens a popup showing many relevant pages, the second method doesn't work.

I would love to know if there is a better way of doing this, or, @yygstaff, if there is a possibility that a "share" button be added of some kind. If I need to link a bunch of pages, it takes forever.
 
Last edited:

FrostyCat

Redemption Seeker
Here's a Firefox GreaseMonkey script I wrote for this several years ago:
Code:
// ==UserScript==
// @name        Add links to Manual
// @namespace   http://docs.yoyogames.com/source/dadiospice
// @description Add copy link buttons to GMS Manual titles
// @version     1
// @grant       none
// @include     http://docs.yoyogames.com/source/dadiospice/*
// @exclude     http://docs.yoyogames.com/source/dadiospice/index.html
// ==/UserScript==

// Get top title
var top_title = document.getElementsByTagName('h1')[0];
var title_label = top_title.innerHTML;

// Copy link
var new_copy_link = document.createElement('a');
new_copy_link.innerHTML = '☍';
new_copy_link.setAttribute('onclick', 'prompt("Link to this Manual entry:", location.href);');
new_copy_link.setAttribute('title', 'Link to this page');
new_copy_link.setAttribute('style', 'cursor: pointer;');

// Copy BBCode link for GMC
var new_bbcode_link = document.createElement('a');
new_bbcode_link.innerHTML = '➼';
new_bbcode_link.setAttribute('onclick', 'prompt("BBCode link to this page", "[url=' + location.href + ']' + title_label + '[/url]")');
new_bbcode_link.setAttribute('title', 'BBCode link to this page');
new_bbcode_link.setAttribute('style', 'cursor: pointer;');

// Insert into top title
top_title.innerHTML += ' ';
top_title.appendChild(new_copy_link);
top_title.innerHTML += ' ';
top_title.appendChild(new_bbcode_link);
I've once filed a suggestion for adding links to copy/bookmark URLs in the online Manual, YoYo threw it out for not fitting into their pipeline. That's why I had to resort to this.
 
C

CedSharp

Guest
Here's a Firefox GreaseMonkey script I wrote for this several years ago:
Code:
// ==UserScript==
// @name        Add links to Manual
// @namespace   http://docs.yoyogames.com/source/dadiospice
// @description Add copy link buttons to GMS Manual titles
// @version     1
// @grant       none
// @include     http://docs.yoyogames.com/source/dadiospice/*
// @exclude     http://docs.yoyogames.com/source/dadiospice/index.html
// ==/UserScript==

// Get top title
var top_title = document.getElementsByTagName('h1')[0];
var title_label = top_title.innerHTML;

// Copy link
var new_copy_link = document.createElement('a');
new_copy_link.innerHTML = '☍';
new_copy_link.setAttribute('onclick', 'prompt("Link to this Manual entry:", location.href);');
new_copy_link.setAttribute('title', 'Link to this page');
new_copy_link.setAttribute('style', 'cursor: pointer;');

// Copy BBCode link for GMC
var new_bbcode_link = document.createElement('a');
new_bbcode_link.innerHTML = '➼';
new_bbcode_link.setAttribute('onclick', 'prompt("BBCode link to this page", "[url=' + location.href + ']' + title_label + '[/url]")');
new_bbcode_link.setAttribute('title', 'BBCode link to this page');
new_bbcode_link.setAttribute('style', 'cursor: pointer;');

// Insert into top title
top_title.innerHTML += ' ';
top_title.appendChild(new_copy_link);
top_title.innerHTML += ' ';
top_title.appendChild(new_bbcode_link);
I've once filed a suggestion for adding links to copy/bookmark URLs in the online Manual, YoYo threw it out for not fitting into their pipeline. That's why I had to resort to this.
Greatly appreciated, thanks.
 
Top