Widget:Google Books: Unterschied zwischen den Versionen

Aus Hist. Verein Herne / Wanne-Eickel
KKeine Bearbeitungszusammenfassung
KKeine Bearbeitungszusammenfassung
 
Zeile 1: Zeile 1:
<noinclude>__NOTOC__
<noinclude>__NOTOC__
This widget allows you to embed '''[http://code.google.com/apis/books/docs/preview-wizard.html Google Books]''' on your wiki page.
This widget allows you to embed '''[https://code.google.com/apis/books/docs/preview-wizard.html Google Books]''' on your wiki page.


Created by [https://www.mediawikiwidgets.org/User:Arv Arv]
Created by [https://www.mediawikiwidgets.org/User:Arv Arv] and adapted by [https://www.mediawikiwidgets.org/User:FrancisFranck FrancisFranck]


== Using this widget ==
== Using this widget ==
Zeile 8: Zeile 8:


== Copy to your site ==
== Copy to your site ==
To use this widget on your site, just install [https://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy the [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as page '''{{FULLPAGENAME}}'''.
To use this widget on your site, install [https://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy the [{{fullurl:{{FULLPAGENAME}}|action=edit}} complete source code] of this page to your wiki as page '''{{FULLPAGENAME}}'''.
</noinclude>


<nowiki>
<includeonly>
{{#widget:Google Books
|id=Q8ysL64pM54C
|height=750
|width=450}}
</nowiki>
</noinclude><includeonly><!--{counter name="bookDivID" assign="bookDivID"}--><div id="viewerCanvas<!--{$bookDivID|escape:'html'}-->" style="width: <!--{$width|escape:'html'|default:'600'}-->px; height: <!--{$height|escape:'html'|default:500}-->px"></div>
<!--{if $bookDivID == 1}--><script type="text/javascript" src="//www.google.com/jsapi"></script>
<script type="text/javascript">
      var widgetbooks = [];
      var bookwidgetloaded = false;
 
      var showbooks = function() {
        if (!bookwidgetloaded) { return; }
 
        for(var i=0; i<widgetbooks.length; i++) {
              var widget = widgetbooks[i];
              var viewer = new google.books.DefaultViewer(document.getElementById(widget.element));
              viewer.load(widget.id);
        }
      };


      google.setOnLoadCallback(function() {
<script type="text/javascript" src="//books.google.com/books/previewlib.js">
        bookwidgetloaded = true;
        showbooks();
      });
      google.load("books", "0");
</script>
</script>
<!--{/if}--><script type="text/javascript">
<script type="text/javascript">
widgetbooks[widgetbooks.length] = { element: 'viewerCanvas<!--{$bookDivID|escape:'quotes'}-->', id: '<!--{$id|escape:'quotes'}-->' };
width=<!--{$width|escape:'html'|default:'600'}-->;
showbooks();
height=<!--{$height|escape:'html'|default:'500'}-->;
var welk='<!--{$id}-->';
GBS_insertEmbeddedViewer(welk,width,height);
</script>
</script>
</includeonly>
</includeonly>

Aktuelle Version vom 17. November 2023, 19:50 Uhr

This widget allows you to embed Google Books on your wiki page.

Created by Arv and adapted by FrancisFranck

Using this widget

For information on how to use this widget, see widget description page on MediaWikiWidgets.org.

Copy to your site

To use this widget on your site, install MediaWiki Widgets extension and copy the complete source code of this page to your wiki as page Widget:Google Books.