Skip to content

Instantly share code, notes, and snippets.

@shugo
shugo / mastodon-url-share-with-hashtags.js
Last active November 19, 2025 03:24 — forked from hiko-p/mastodon-url-share-with-hashtags.js
閲覧中のWebページをmastodonに共有するためのブックマークレット。デフォルト付与するハッシュタグを決めておいたり、タイトルに含まれるハッシュタグなんかもカバーします。
javascript: (function () {
let title = document.title ? document.title : document.location.pathname.split('/').pop();
const url = document.URL;
const hashtagsearch = /\s*#\S+/g;
const hashsearch = /#/g;
const atsearch = /@/g;
/*
* 投稿先サーバFQDN
* 利用されているサーバに合わせて書き換えてください

問題1. 選択肢の中からRubyの予約語ではないものを2つ選択してください。

  • A.super
  • B.begin
  • C.try
  • D.goto

問題2. 以下のコードを実行した出力として正しいものを1つ選択してください。

def foo (a, *b)
 p a