Skip to content

Instantly share code, notes, and snippets.

@eoureo
eoureo / Obsidian_Full-width_Disable-Readable_line_length-on-page.css
Last active March 19, 2023 13:43
Obsidian Full-width lines: Disable "Readable line length" on specific pages only. (Default and Minimal Theme) 옵시디언 노트 글 너비 100% 만들기: 읽기 쉬운 행 길이(Readable line length)을 사용하는 경우 특정한 페이지만 그 설정을 사용하지 않도록 하여 줄 너비를 늘린다.(기본과 미니멀 테마 둘 다에 적용)
/*
1. 노트의 frontmatter에 추가 (Add to the Frontmatter of the notes you want)
cssclass: width-100
2. "Settings > Appearance > CSS Snippets"에 설정 (Set to "Settings > Appearance > CSS Snippets")
my_style.css에 추가 (Add to my_style.css)
*/
.view-content > .width-100.markdown-source-view.mod-cm6 > .cm-editor > .cm-scroller {
@eoureo
eoureo / Obsidian_full-width_cssclass.css
Created March 17, 2023 02:59
Make the width of the note lines into full-width. (노트 글 너비(width)를 100%로 만들기 (full-width))
/*
1. 노트의 frontmatter에 추가 (Add to the Frontmatter of the notes you want)
cssclass: my_style_width_100
2. "Settings > Appearance > CSS Snippets"에 설정 (Set to "Settings > Appearance > CSS Snippets")
my_style.css에 추가 (Add to my_style.css)
*/
/* Editing View */
.my_style_width_100 .cm-sizer,
@eoureo
eoureo / Bookmarklet-Obsidian-DailyNote-Add-TimeList-[T](U).js
Last active March 31, 2023 03:51
옵시디언의 일지(Daily note)에 리스트 덧붙이는 Bookmarklet ("- 07:30 [T](U)" 형식 - 시각, 웹 페이지 제목과 주소)
javascript:(/*Add to Daily note in Obsidian*/function(){
/* Bookmarklet: 웹 페이지 제목과 주소를 `- 07:30 [T](U)`형식으로 Obsidin의 Daily note에 한 줄 덧붙이기 */
/* 설정 시작 ============== */
let valult_name = "V-07"; /* 옵시디안의 볼트 이름 */
let daily_note_folder = "journals"; /* Daily note 저장 폴더 */
/* 설정 끝 ================ */
/* 컴퓨터에 설정된 지역 날짜와 시간을 얻기 */
var timezoneOffset = new Date().getTimezoneOffset() * 60000;
@eoureo
eoureo / Bookmarklet-[T](U).js
Last active March 5, 2023 23:02
ChatGPT를 써서 만든 Bookmarklet - "페이지 제목과 URL을 마크다운 형식 [T](U) 으로 클립보드에 저장하는 Bookmarklet을 만들어줘"
javascript:(function() {
var title = document.title;
var url = window.location.href;
var markdown = `[${title}](${url})`;
navigator.clipboard.writeText(markdown).then(function() {
console.log("Copied to clipboard: " + markdown);
}, function(err) {
console.error("Failed to copy text: ", err);
});
})()
@eoureo
eoureo / Bookmarklet-[T](U)-http,https.js
Last active March 14, 2023 14:04
ChatGPT를 써서 만든 Bookmarklet [T](U) - HTTP와 HTTPS에서 되도록 해줘.
javascript:(function() {
var markdown = "[" + document.title + "](" + window.location.href + ")";
var fakeElem = document.createElement('textarea');
fakeElem.value = markdown;
fakeElem.setAttribute('readonly', '');
fakeElem.style.position = 'absolute';
fakeElem.style.left = '-9999px';
document.body.appendChild(fakeElem);
fakeElem.select();
document.execCommand('copy');
<h1>화순군 버스정보</h1>
20.06.16 방면별 화순 운행시간표 (2020-06-17)<br>
<a href="http://bis.hwasun.go.kr/guide/notice/noticeView?SEQ=24">http://bis.hwasun.go.kr/guide/notice/noticeView?SEQ=24</a><br>
<br>
<table align="center" border="1" cellpadding="2" cellspacing="2" style="width: 430px; height: 400px;">
<thead>
<tr>
<th colspan="5" scope="col" style="text-align: center;">