{"id":5157,"date":"2011-03-08T11:44:00","date_gmt":"2011-03-08T11:44:00","guid":{"rendered":"https:\/\/www.heartinternet.uk\/blog\/?p=5157"},"modified":"2011-03-08T11:44:00","modified_gmt":"2011-03-08T11:44:00","slug":"extends-javascript-code-snippets-have-been-refreshed-and-updated","status":"publish","type":"post","link":"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/","title":{"rendered":"eXtend\u2019s Javascript code snippets have been refreshed and updated"},"content":{"rendered":"<p>We have had a &ldquo;Javascript Generator&rdquo; page in eXtend for some years now. They were nice in their time (circa 2004) however scripts such as &ldquo;bookmark us&rdquo; buttons would just show text in modern browsers, the &ldquo;popup page&rdquo; would routinely be blocked nowadays, and the &ldquo;frameless popup&rdquo; only work in IE6. Simple widgets for a simple time.<\/p>\n<p>Because of this we have replaced them with modified versions of some of our own code which can give your site more of an interactive feel. They&rsquo;re all relatively simple code which you should be able to customise without much trouble.<\/p>\n<p>There are a lot more scripts to choose from and we have also changed the way this page works so that it updates the page in-line rather than going to a new page. The page also puts in the name of the site being administered (where relevant) automatically.<\/p>\n<h4>Getting started<\/h4>\n<p>These are all live and ready to use within eXtend for all our web hosting customers. Simply log in to eXtend, scroll down to &lsquo;Web resources&rsquo; and click on the &lsquo;Javascript maker&rsquo; icon.<\/p>\n<p>We have also updated this for reseller hosting customers to pass on to their clients. If you have the &lsquo;Javascript maker&rsquo; feature already enabled for your customers you don&rsquo;t need to do anything. If you don&rsquo;t, and you&rsquo;d like to, log in to your RCC and navigate to the &lsquo;<a href=\"https:\/\/customer.heartinternet.uk\/manage\/manage-package-types.cgi\">Configure hosting packages<\/a>&rsquo; page. In &lsquo;Web tools&rsquo; tick the &lsquo;Javascript maker&rsquo; box and then click on &lsquo;Edit package&rsquo; to save the changes.<\/p>\n<h4>The features&hellip;<\/h4>\n<h4>AJAX include<\/h4>\n<p>This basically behaves a lot like using an<iframe>, but without actually using an &amp;amp;amp;amp;amp;amp;amp;amp;lt;iframe&amp;amp;amp;amp;amp;amp;amp;amp;gt; and is launchable via Javascript. It&amp;amp;amp;amp;amp;amp;#8217;s the same kind of thing that Facebook does when loading the news feed.&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;br&amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;Auto-refresh&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;Automatically reloads the page after a set interval. This is similar to a &amp;amp;amp;amp;amp;amp;amp;amp;lt;meta&amp;amp;amp;amp;amp;amp;amp;amp;gt; refresh except that it potentially gives you more control.&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;Break frames&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;This is an updated (and essentially unchanged) one. If your page is being loaded from a frame, it will reload itself without the frame.&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;Click to expand&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;This is probably one of the first things people would want to do with Javascript. You click something, something expands. You click it again, it goes away. There are many ways to do this; the approach used in this case should be accessible to novices.&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;Date picker&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;This is a pretty common use of Javascript that you see out in the Internet. You click on a text input, and instead of having to type a date (or use awkward dropdowns) it presents a simple calendar interface.&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;HTML5 &amp;amp;amp;amp;amp;amp;amp;amp;lt;input&amp;amp;amp;amp;amp;amp;amp;amp;gt; placeholder&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;There are situations where you want to demonstrate what to put into an &amp;amp;amp;amp;amp;amp;amp;amp;lt;input&amp;amp;amp;amp;amp;amp;amp;amp;gt; box, but don&amp;amp;amp;amp;amp;amp;#8217;t have the screen space to do it. A common technique to deal with that is to put some text in by default which gets wiped when you first click in there. This is an improved version of that technique, which emulates support for the &amp;amp;amp;amp;amp;amp;amp;amp;lt;input placeholder&amp;amp;amp;amp;amp;amp;amp;amp;gt; attribute on browsers which don&amp;amp;amp;amp;amp;amp;#8217;t support it.&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;Image swapper&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;Swapping images around like you see on Amazon and similar sites is really easy. This snippet just requires you to put your thumbnails somewhere predictable, and basically takes care of the rest.&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;Inline popup&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;Provides a pseudo-popup, like we use in some places. It&amp;amp;amp;amp;amp;amp;#8217;s useful to provide in-front information without getting caught by popup blockers. To close the popup, you just click anywhere in the background.&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;Get title from &amp;amp;amp;amp;amp;amp;amp;amp;lt;h1&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;This is another one that we use ourselves, to save having the title written twice in each page.&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;Language&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;This is another pre-existing snippet, although rewritten to be easier to use. It detects the browser language and redirects to an appropriate page.&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;Logo branding&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;This is another pre-existing one &#8211; it used to suggest that you could make your site look like Geocities by slapping a logo in the corner. It still does that basic task, but in a simpler way.&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;Sort table rows&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;This is a task that&amp;amp;amp;amp;amp;amp;#8217;s quite commonly handed off to a CGI\/PHP script, but it doesn&amp;amp;amp;amp;amp;amp;#8217;t need to be. The snippet shows how to sort by any column you like.&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;Word tooltips&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/h4&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;gt;This is the same basic way that we provide glossary information in support database articles and tickets. For a pre-defined set of words, if you hover over the word a &amp;amp;amp;amp;amp;amp;#8220;tooltip&amp;amp;amp;amp;amp;amp;#8221; appears.&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/p&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;\/div&amp;amp;amp;amp;amp;amp;amp;amp;gt;<\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have had a &ldquo;Javascript Generator&rdquo; page in eXtend for some years now. They were nice in their time (circa 2004) however scripts such as &ldquo;bookmark us&rdquo; buttons would just&#8230;<\/p>\n","protected":false},"author":2,"featured_media":8180,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":{"0":"post-5157","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-extend"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>eXtend\u2019s Javascript code snippets have been refreshed and updated - Heart Internet<\/title>\n<meta name=\"description\" content=\"eXtend\u2019s Javascript code snippets have been refreshed and updated - Written by the team at Heart Internet.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"eXtend\u2019s Javascript code snippets have been refreshed and updated - Heart Internet\" \/>\n<meta property=\"og:description\" content=\"eXtend\u2019s Javascript code snippets have been refreshed and updated - Written by the team at Heart Internet.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/\" \/>\n<meta property=\"og:site_name\" content=\"Heart Internet\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/heartinternet\/\" \/>\n<meta property=\"article:published_time\" content=\"2011-03-08T11:44:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2015\/06\/category_extend@2x1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1620\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Eliot Chambers-Ostler\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@heartinternet\" \/>\n<meta name=\"twitter:site\" content=\"@heartinternet\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Eliot Chambers-Ostler\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/\"},\"author\":{\"name\":\"Eliot Chambers-Ostler\",\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/person\/58ed7f27cc0f3ab6e69135742a5eee28\"},\"headline\":\"eXtend\u2019s Javascript code snippets have been refreshed and updated\",\"datePublished\":\"2011-03-08T11:44:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/\"},\"wordCount\":2343,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/heartblog.victory.digital\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2015\/06\/category_extend@2x1.jpg\",\"articleSection\":[\"eXtend\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/\",\"url\":\"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/\",\"name\":\"eXtend\u2019s Javascript code snippets have been refreshed and updated - Heart Internet\",\"isPartOf\":{\"@id\":\"https:\/\/heartblog.victory.digital\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2015\/06\/category_extend@2x1.jpg\",\"datePublished\":\"2011-03-08T11:44:00+00:00\",\"description\":\"eXtend\u2019s Javascript code snippets have been refreshed and updated - Written by the team at Heart Internet.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/#primaryimage\",\"url\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2015\/06\/category_extend@2x1.jpg\",\"contentUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2015\/06\/category_extend@2x1.jpg\",\"width\":1620,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.heartinternet.uk\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"eXtend\u2019s Javascript code snippets have been refreshed and updated\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/heartblog.victory.digital\/#website\",\"url\":\"https:\/\/heartblog.victory.digital\/\",\"name\":\"Heart Internet\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/heartblog.victory.digital\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/heartblog.victory.digital\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/heartblog.victory.digital\/#organization\",\"name\":\"Heart Internet\",\"url\":\"https:\/\/heartblog.victory.digital\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/02\/HeartInternet_Logo_Colour.webp\",\"contentUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/02\/HeartInternet_Logo_Colour.webp\",\"width\":992,\"height\":252,\"caption\":\"Heart Internet\"},\"image\":{\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/heartinternet\/\",\"https:\/\/x.com\/heartinternet\",\"https:\/\/www.linkedin.com\/company\/heart-internet-ltd\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/person\/58ed7f27cc0f3ab6e69135742a5eee28\",\"name\":\"Eliot Chambers-Ostler\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/08\/cropped-Eliot-96x96.jpg\",\"contentUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/08\/cropped-Eliot-96x96.jpg\",\"caption\":\"Eliot Chambers-Ostler\"},\"url\":\"https:\/\/www.heartinternet.uk\/blog\/author\/eliot-chambers-ostler\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"eXtend\u2019s Javascript code snippets have been refreshed and updated - Heart Internet","description":"eXtend\u2019s Javascript code snippets have been refreshed and updated - Written by the team at Heart Internet.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/","og_locale":"en_GB","og_type":"article","og_title":"eXtend\u2019s Javascript code snippets have been refreshed and updated - Heart Internet","og_description":"eXtend\u2019s Javascript code snippets have been refreshed and updated - Written by the team at Heart Internet.","og_url":"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/","og_site_name":"Heart Internet","article_publisher":"https:\/\/www.facebook.com\/heartinternet\/","article_published_time":"2011-03-08T11:44:00+00:00","og_image":[{"width":1620,"height":720,"url":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2015\/06\/category_extend@2x1.jpg","type":"image\/jpeg"}],"author":"Eliot Chambers-Ostler","twitter_card":"summary_large_image","twitter_creator":"@heartinternet","twitter_site":"@heartinternet","twitter_misc":{"Written by":"Eliot Chambers-Ostler","Estimated reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/#article","isPartOf":{"@id":"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/"},"author":{"name":"Eliot Chambers-Ostler","@id":"https:\/\/heartblog.victory.digital\/#\/schema\/person\/58ed7f27cc0f3ab6e69135742a5eee28"},"headline":"eXtend\u2019s Javascript code snippets have been refreshed and updated","datePublished":"2011-03-08T11:44:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/"},"wordCount":2343,"commentCount":2,"publisher":{"@id":"https:\/\/heartblog.victory.digital\/#organization"},"image":{"@id":"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/#primaryimage"},"thumbnailUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2015\/06\/category_extend@2x1.jpg","articleSection":["eXtend"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/","url":"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/","name":"eXtend\u2019s Javascript code snippets have been refreshed and updated - Heart Internet","isPartOf":{"@id":"https:\/\/heartblog.victory.digital\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/#primaryimage"},"image":{"@id":"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/#primaryimage"},"thumbnailUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2015\/06\/category_extend@2x1.jpg","datePublished":"2011-03-08T11:44:00+00:00","description":"eXtend\u2019s Javascript code snippets have been refreshed and updated - Written by the team at Heart Internet.","breadcrumb":{"@id":"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/#primaryimage","url":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2015\/06\/category_extend@2x1.jpg","contentUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2015\/06\/category_extend@2x1.jpg","width":1620,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/www.heartinternet.uk\/blog\/extends-javascript-code-snippets-have-been-refreshed-and-updated\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.heartinternet.uk\/blog\/"},{"@type":"ListItem","position":2,"name":"eXtend\u2019s Javascript code snippets have been refreshed and updated"}]},{"@type":"WebSite","@id":"https:\/\/heartblog.victory.digital\/#website","url":"https:\/\/heartblog.victory.digital\/","name":"Heart Internet","description":"","publisher":{"@id":"https:\/\/heartblog.victory.digital\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/heartblog.victory.digital\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/heartblog.victory.digital\/#organization","name":"Heart Internet","url":"https:\/\/heartblog.victory.digital\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/heartblog.victory.digital\/#\/schema\/logo\/image\/","url":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/02\/HeartInternet_Logo_Colour.webp","contentUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/02\/HeartInternet_Logo_Colour.webp","width":992,"height":252,"caption":"Heart Internet"},"image":{"@id":"https:\/\/heartblog.victory.digital\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/heartinternet\/","https:\/\/x.com\/heartinternet","https:\/\/www.linkedin.com\/company\/heart-internet-ltd"]},{"@type":"Person","@id":"https:\/\/heartblog.victory.digital\/#\/schema\/person\/58ed7f27cc0f3ab6e69135742a5eee28","name":"Eliot Chambers-Ostler","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/heartblog.victory.digital\/#\/schema\/person\/image\/","url":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/08\/cropped-Eliot-96x96.jpg","contentUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/08\/cropped-Eliot-96x96.jpg","caption":"Eliot Chambers-Ostler"},"url":"https:\/\/www.heartinternet.uk\/blog\/author\/eliot-chambers-ostler\/"}]}},"_links":{"self":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/posts\/5157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/comments?post=5157"}],"version-history":[{"count":0,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/posts\/5157\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/media\/8180"}],"wp:attachment":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/media?parent=5157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/categories?post=5157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/tags?post=5157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}