Warning: in_array() expects parameter 2 to be array, null given in /var/www/html/microblog/wp-includes/kses.php on line 1416

Warning: in_array() expects parameter 2 to be array, null given in /var/www/html/microblog/wp-includes/kses.php on line 1416

1月, 2018 からの更新 コメントスレッドの表示切替 | キーボードショートカット

  • fumiya 19:56 | 2018-01-07 パーマリンク | 返信  


    Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 7 in /var/www/html/microblog/wp-content/themes/p2-fork/inc/mentions.php on line 77

    MacからWindowsに完全移行して一年くらい経つけど、今日ようやくgit-bashからUbuntu on Windowsに移行した。

    中身はただのUbuntu 16.04、CPU・メモリ・アーキテクチャはまるっきりWindowsと同じで、これが仮想環境に対するアドバンテージっぽい。もちろん apt-get も使えるのが嬉しい。

    git-bashはexeを動かせるのでそれは便利なんだけど、たまに動かないシェルスクリプトとかあったり、zsh使えなくて不便だったので、早くこっちに移行すればよかった。

     
  • fumiya 20:48 | 2018-01-05 パーマリンク | 返信  


    Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 7 in /var/www/html/microblog/wp-content/themes/p2-fork/inc/mentions.php on line 77

    結局ブックマークレットも中途半端で、完成せず仕舞いになってしまった。まぁまだ新年も始まったばかりだし、いいかなーと思ったり(爆

     
  • fumiya 21:12 | 2018-01-04 パーマリンク | 返信  


    Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 7 in /var/www/html/microblog/wp-content/themes/p2-fork/inc/mentions.php on line 77

    あけましておめでとうございます。そういえば結局、年越しのときにブックマークレットを作成しようとして、新バージョンの作成が中途半端になってから、更新が滞ってた。

     
  • fumiya 02:47 | 2018-01-01 パーマリンク | 返信  


    Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 7 in /var/www/html/microblog/wp-content/themes/p2-fork/inc/mentions.php on line 77

    新しいURLカードの投稿テスト。

     
    • fumiya 02:48 | 2018-01-01 パーマリンク |


      Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 7 in /var/www/html/microblog/wp-content/themes/p2-fork/inc/mentions.php on line 77

      ダメっぽいな。失敗か。

    • fumiya 02:54 | 2018-01-01 パーマリンク |


      Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 7 in /var/www/html/microblog/wp-content/themes/p2-fork/inc/mentions.php on line 77

      WordPressの制限か…、仕方ないな。


  • fumiya 00:55 | 2018-01-01 パーマリンク | 返信  


    Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 7 in /var/www/html/microblog/wp-content/themes/p2-fork/inc/mentions.php on line 77

    URLをカード化するブックマークレット、案外サムネが取得できないので、フォールバックとして favicon.ico を取得するように修正してみた。

    
    javascript:void%20function(){void%20function(){(function(){function%20t(t){return%20String(t).replace(/[%26%3C%3E%22'`=\/%20\t\n]/g,function(t){return%20r[t]%3Fr[t]:t})}var%20e=window.location.href,o=document.querySelector(%22title%22).innerText,n=%22%22,i=document.querySelector(%22meta[property='og:description']%22);i%3Fn=i.getAttribute(%22content%22):(i=document.querySelector(%22meta[name='description']%22),n=i%3Fi.getAttribute(%22content%22):document.querySelector(%22body%22).textContent);var%20r={%22%26%22:%22%26amp;%22,%22%3C%22:%22%26lt;%22,%22%3E%22:%22%26gt;%22,'%22':%22%26quot;%22,%22'%22:%22%26%2339;%22,%22/%22:%22%26%23x2F;%22,%22`%22:%22%26%23x60;%22,%22=%22:%22%26%23x3D;%22,%22%20%20%20%22:%22%20%22,%22\r%22:%22%22,%22\n%22:%22%22};n%26%26(n=n.substring(0,70)+%22...%22,n=t(n),n=n.split(/[%20\t\n]+/g).join(%22%20%22));var%20a=%22%22,l=document.querySelector(%22meta[property='og:image']%22),c=document.querySelector(%22link[rel='shortcut%20icon']%22);l%26%26(a=l.getAttribute(%22content%22))||c%26%26(a=c.getAttribute(%22href%22).replace(/^\//,window.location.protocol+%22//%22+window.location.host+%22/%22)),0==a.length%26%26(a=%22%22);var%20d='%3Cdiv%20class=%22cardlet-box%22%20style=%22margin-bottom:0px;%22%3E%3Cdiv%20class=%22cardlet-image%22%20style=%22float:left;margin:0px%2012px%201px%200px;%22%3E%3Ca%20href=%22'+e+'%22%20name=%22amazletlink%22%20target=%22_blank%22%3E'+(a.length%3E0%3F'%3Cimg%20src=%22'+a+'%22%20alt=%22'+o+'%22%20style=%22border:%20none;width:50px;max-height:100px;%22%20/%3E':'%3Cspan%20class=%22cardlet-no-image%22%20style=%22display:inline-block;width:50px;height:50px;background:%23efefef;%22%3E%3C/span%3E')+'%3C/a%3E%3C/div%3E%3Cdiv%20class=%22cardlet-info%22%20style=%22line-height:120%25;%20margin-bottom:%2010px%22%3E%3Cdiv%20class=%22cardlet-name%22%20style=%22margin-bottom:10px;line-height:120%25%22%3E%3Ca%20href=%22'+e+'%22%20name=%22amazletlink%22%20target=%22_blank%22%3E'+o+'%3C/a%3E%3C/div%3E%3Cdiv%20class=%22cardlet-detail%22%20style=%22color:%20%23909090;%22%3E'+n+'%3C/div%3E%3Cdiv%20class=%22cardlet-footer%22%20style=%22clear:%20left%22%3E%3C/div%3E%3C/div%3E%3C/div%3E';prompt(%22Copy%20to%20clipboard:%22,d)})()}()}();
    
     
    • fumiya 01:56 | 2018-01-01 パーマリンク |


      Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 7 in /var/www/html/microblog/wp-content/themes/p2-fork/inc/mentions.php on line 77

      今のままだとTwitter連携やSEO用文章生成に支障のあるHTMLを吐くので、そこを修正しよう。

    • fumiya 02:41 | 2018-01-01 パーマリンク |


      Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 7 in /var/www/html/microblog/wp-content/themes/p2-fork/inc/mentions.php on line 77

      できた。コンテンツはJavaScriptで後から中身を置き換えて見栄えを良くし、それまでは単なるリンクにしか見えないようになっている。あとそのリンクには rel=nofollow も付いてる。寝よう。

      javascript:void%20function(){void%20function(){(function(){function%20t(t){return%20String(t).replace(/[%26%3C%3E%22'`=\/%20\t\n]/g,function(t){return%20i[t]%3Fi[t]:t})}var%20e=window.location.href,n=document.querySelector(%22title%22).innerText,o=%22%22,r=document.querySelector(%22meta[property='og:description']%22);r%3Fo=r.getAttribute(%22content%22):(r=document.querySelector(%22meta[name='description']%22),o=r%3Fr.getAttribute(%22content%22):document.querySelector(%22body%22).textContent);var%20i={%22%26%22:%22%26amp;%22,%22%3C%22:%22%26lt;%22,%22%3E%22:%22%26gt;%22,'%22':%22%26quot;%22,%22'%22:%22%26%2339;%22,%22/%22:%22%26%23x2F;%22,%22`%22:%22%26%23x60;%22,%22=%22:%22%26%23x3D;%22,%22%20%20%20%22:%22%20%22,%22\r%22:%22%22,%22\n%22:%22%22};o%26%26(o=o.substring(0,70)+%22...%22,o=t(o),o=o.split(/[%20\t\n]+/g).join(%22%20%22));var%20a=%22%22,l=document.querySelector(%22meta[property='og:image']%22),c=document.querySelector(%22link[rel='shortcut%20icon']%22);l%26%26(a=l.getAttribute(%22content%22))||c%26%26(a=c.getAttribute(%22href%22).replace(/^\//,window.location.protocol+%22//%22+window.location.host+%22/%22)),0==a.length%26%26(a=%22%22);var%20d='%3Cdiv%20class=%22cardlet-box%22%20style=%22margin-bottom:0px;%22%3E%3Cdiv%20class=%22cardlet-image%22%20style=%22float:left;margin:0px%2012px%201px%200px;%22%3E%3Ca%20href=%22'+e+'%22%20name=%22amazletlink%22%20target=%22_blank%22%3E'+(a.length%3E0%3F'%3Cimg%20src=%22'+a+'%22%20alt=%22'+n+'%22%20style=%22border:%20none;width:50px;max-height:100px;%22%20/%3E':'%3Cspan%20class=%22cardlet-no-image%22%20style=%22display:inline-block;width:50px;height:50px;background:%23efefef;%22%3E%3C/span%3E')+'%3C/a%3E%3C/div%3E%3Cdiv%20class=%22cardlet-info%22%20style=%22line-height:120%25;%20margin-bottom:%2010px%22%3E%3Cdiv%20class=%22cardlet-name%22%20style=%22margin-bottom:10px;line-height:120%25%22%3E%3Ca%20href=%22'+e+'%22%20name=%22amazletlink%22%20target=%22_blank%22%3E'+n+'%3C/a%3E%3C/div%3E%3Cdiv%20class=%22cardlet-detail%22%20style=%22color:%20%23909090;%22%3E'+o+'%3C/div%3E%3Cdiv%20class=%22cardlet-footer%22%20style=%22clear:%20left%22%3E%3C/div%3E%3C/div%3E%3C/div%3E',s=%22%22+Math.floor(1e8*Math.random()),m='%3Cscript%3Edocument.addEventListener(%22DOMContentLoaded%22,function(){document.querySelector(%22.cl-'+s+%22\%22).innerHTML='%22+d+%22';%20});%3C/script%3E%22,p='%3Cdiv%20class=%22cardlet-link-container%20cl-'+s+'%22%3E%3Ca%20rel=%22nofollow%22%20href=%22'+e+'%22%3E'+e+%22%3C/a%3E%3C/div%3E%22+m;prompt(%22Copy%20to%20clipboard:%22,p)})()}()}();
      

c
新規投稿作成
j
次の投稿 / 次のコメント
k
過去の投稿 / コメント
r
返信
e
編集
o
コメント表示 / 非表示
t
トップへ移動
l
ログインへ
h
ヘルプを表示 / 非表示
Shift + ESC
取り消し