Skip to content

Instantly share code, notes, and snippets.

@philips
Last active March 12, 2025 18:11
Show Gist options
  • Select an option

  • Save philips/8f4e93cb2be2428344ece63aecca7941 to your computer and use it in GitHub Desktop.

Select an option

Save philips/8f4e93cb2be2428344ece63aecca7941 to your computer and use it in GitHub Desktop.

Revisions

  1. philips revised this gist Jan 28, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion send-to-obsidian.js
    Original file line number Diff line number Diff line change
    @@ -3060,7 +3060,7 @@ function getFileName(fileName) {
    if (windowsPlatforms.indexOf(platform) !== -1) {
    fileName = fileName.replace(':', '').replace(/[/\\?%*|"<>]/g, '-');
    } else {
    fileName = fileName.replace(':', '').replace(/\//g, '-').replace(/\\/g, '-');
    fileName = fileName.replace(/:/g, '').replace(/\//g, '-').replace(/\\/g, '-');
    }
    return fileName;
    }
  2. philips renamed this gist Nov 28, 2023. 1 changed file with 29 additions and 8 deletions.
    37 changes: 29 additions & 8 deletions gistfile1.txt → send-to-obsidian.js
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,20 @@
    /* Optional vault name */
    const vault = "";

    /* Optional folder name such as "Clippings/" */
    const folder = "";

    /* Optional tags */
    let tags = "clippings";



    /*
    *
    * Embed turndown@6.0.0 to work around content security policies breaking import statements
    *
    */

    function extend (destination) {
    for (var i = 1; i < arguments.length; i++) {
    var source = arguments[i];
    @@ -893,6 +910,13 @@ function canConvert (input) {
    }


    /*
    *
    * Embed @tehshrike/readability@0.2.0 to work around content security policies breaking import statements
    *
    */


    /*
    * Copyright (c) 2010 Arc90 Inc
    *
    @@ -2982,17 +3006,14 @@ Readability.prototype = {



    /*
    *
    * Send to Obsidian
    *
    */



    /* Optional vault name */
    const vault = "";

    /* Optional folder name such as "Clippings/" */
    const folder = "";

    /* Optional tags */
    let tags = "clippings";

    /* parse and lightly clean the site's meta keywords content into tags, if present */
    if (document.querySelector('meta[name="keywords" i]')) {
  3. philips created this gist Nov 28, 2023.
    3,115 changes: 3,115 additions & 0 deletions gistfile1.txt
    3,115 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.