This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#control_object_class1 > div > div.result > table > tbody > tr > td:nth-child(2) > a').each(function() { if ($(this).text().indexOf('新規公開時') < 0) { $(this).parent().parent().hide() } }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 共有ドライブの作成 | |
*/ | |
function createTeamDriveItems() { | |
// ------------------------------ | |
// 共有ドライブ、フォルダ、ファイルの作成 | |
// ------------------------------ | |
// [作成するフォルダ構造] | |
// 共有ドライブ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 共有ドライブを削除(ID指定) | |
* @param {string} teamDriveId - 対象の共有ドライブID | |
*/ | |
function removeById(teamDriveId) { | |
var teamDriveFolder = DriveApp.getFolderById(teamDriveId) | |
// 直下のフォルダを全て削除 | |
// 共有ドライブを削除するには中身を空にしなければならないので削除する | |
var folders = teamDriveFolder.getFolders() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 共有ドライブにフォルダを作成(ID指定) | |
* @param {string} teamDriveId - 共有ドライブID | |
* @param {string} folderName - フォルダ名 | |
* @return {Folder} - 作成したフォルダ | |
*/ | |
function createFolderById(teamDriveId, folderName) { | |
var parentFolder = DriveApp.getFolderById(teamDriveId) // 対象の共有ドライブを取得(親フォルダとなる) | |
return parentFolder.createFolder(folderName) // 子フォルダを作成 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 新規に共有ドライブを作成する | |
* @param {string} teamDriveName - 共有ドライブ名 | |
* @return {TeamDrive} - 新規の共有ドライブ | |
*/ | |
function create(teamDriveName) { | |
// 論理的な共有ドライブを作成 | |
var teamDrive = Drive.newTeamDrive() | |
teamDrive.name = teamDriveName // 共有ドライブに名前を付ける | |
var teamDriveId = Utilities.getUuid() // アイテムのIDを生成 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 共有ドライブ名から共有ドライブを取得 | |
* @param {string} teamDriveName - 共有ドライブ名 | |
* @return {TeamDrive} - 共有ドライブ | |
*/ | |
function getByName(teamDriveName) { | |
// 共有ドライブのリストから一致する名前を検索(オプション使用) | |
const teamDrives = Drive.Teamdrives.list({q: "name contains '"+teamDriveName+"'", useDomainAdminAccess:true}).items | |
return teamDrives[0] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* GoogleドライブのFolder型に変換 | |
* @param {TeamDrive} teamDrive - 共有ドライブ | |
* @return {Folder} - フォルダ | |
*/ | |
function toFolder(teamDrive) { | |
// 共有ドライブのIDからFolderオブジェクトを取得する | |
return DriveApp.getFolderById(teamDrive.id) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @return {Lib} - FooES5 | |
*/ | |
var FooES5 = function() { | |
} | |
/** | |
* hogeメソッド | |
* @return {bool} - true固定 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fooインスタンスを生成して取得する | |
* @return {Lib} - Fooインスタンス | |
*/ | |
function create() { | |
return new Foo() // Fooクラスのインスタンスを生成して返却 | |
} | |
/** | |
* hogeメソッド |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo { | |
constructor() { | |
this._bar = 0 | |
} | |
/** | |
* hogeメソッド | |
* @return {bool} - true固定 | |
*/ | |
hoge() { |
NewerOlder