JSFiddle

  • dcroll down

    No-Library (pure JS), HTML, CSS, JavaScript

    window.scrollTo(0,document.body.scrollHeight);
    
  • OSM: approximate center of 3 coordonates

    No-Library (pure JS), HTML, CSS, JavaScript

    var getCentroid = function (arr) { 
        return arr.reduce(function (x,y) {
            return [x[0] + y[0]/arr.length, x[1] + y ...
  • SVG: Draw from empty page #6 is the latest revision

    No-Library (pure JS), HTML, CSS, JavaScript

    var svg_url = 'http://www.w3.org/2000/svg';
    var body = jQuery('body'),
        svg = jQuery(document.createElementNS(svg_url, 'svg'));
    
    svg.attr ...
  • OSM: minimal map with Leaflet

    No-Library (pure JS), HTML, CSS, JavaScript

    // Create the map
    var center = [48.08909, -1.62486];
    var map = L.map('map').setView(center, 10);
    
    // Set up the ...
  • Discord: channel messages destroyer

    This script destroy all your messages in a discordapp.com channels. You just have to copy past this code to your browser console and set your displayed username as run parameter

    function destroy(name, elems) {
        if (elems == undefined) {
            elems = get_action_buttons_for(name);
        }
        e = elems.pop();
        if (e == undefined) {
            elems = get_action_buttons_for(name);
            e ...
  • OSM: travel time calculation form a point #23 is the latest revision

    No-Library (pure JS), HTML, CSS, JavaScript

    //// center of the map
    var center = [48.08909, -1.62486];
    String.prototype.toHHMMSS = function () {
        var sec_num = parseInt(this, 10); // don ...